[PHP for the Web:
Visual QuickStart Guide
(4th Edition)](/books/php-for-the-web-visual-quickstart-guide-4th-edition/)
Unfortunately, despite the best efforts of myself, the technical editor, the copy editor, the line editor, the proofreader, and despite the multiple revisions, errors still occur. This page lists all the errors found in the book since it went to print.
Note: errors are corrected in subsequent printings and therefore your particular copy may not contain all of the following. You may also be experiencing problems not caused by a mistake in the book. If so, you may find the solution to your problem by using the book’s corresponding forum. Significant changes in the technology will be addressed there and you can also find problems and solutions encountered by other readers.
Known Errors in the Book:
\[php\]\['terms'\]\['terms'\]\[/php\]The wrong clause also erroneously ends up in Scripts 6.6, 6.7, and 6.8 (I say “erroneously” because while it’s a suggested addition, you’re not formally asked to add that code to the scripts).June 23, 20116: Control Structures144The sidebar erroneously says that break can be used to exit an if-else conditional. break only applies to loops and switch.April 5, 20128: Creating Web Applications190The referenced file in Step 1 should be template.html, not layout.html.August 19, 20118: Creating Web Applications216In the third tip, “selected” erroneously has a hyphen in it.August 28, 20128: Creating Web Applications217In the second piece of code, there’s an extra apostrophe before “email@example.com”.November 20, 20118: Creating Web Applications230In the first “review” item, it should be require(), not “required()".April 3, 20139: Cookies and Sessions243The first code example is missing a single quotation mark in **setcookie(‘cart’, ‘82ABC3012’, time()+3600, ‘’, ‘shop.example.com’, 1);**February 3, 20169: Cookies and Sessions254Not exactly sure what happened in Script 9.8, but the code in the explanation and steps is correct: session_start(), $_SESSION = array(), and session_destroy(). As an added precaution, you can also send a cookie that deletes the session cookie.June 1, 20119: Cookies and Sessions256In the third “Pursue” prompt, it should say “using the $_POST values” instead of “using the $_GET values” as the form uses the POST method.June 1, 201110: Creating Functions270There’s an extraneous ‘v’ before htmlspecialchars() in the code under Step 6.July 28, 201112: Intro to Databases344In the penultimate line of code for Step 2, there’s an extraneous closing parentheses. The corresponding script is correct.April 3, 201313: Putting It All Together394Step 5 should begin with the inclusion of the database connection script.August 28, 201213: Putting It All Together395Line 65 of Script 13.7, add_quote.php, should include the footer file, not the header file. The corresponding instruction under Step 12 on page 396 is correct.June 23, 201113: Putting It All Together409Step 10 has one closing parentheses too many.August 28, 201213: Putting It All Together412Line 53 of Script 13.11, index.php, should end with a closing paragraph tag. This also applies to the corresponding instruction under Step 13 on page 413.June 23, 2011