PHP and MySQL for Dynamic Web Sites: Visual QuickPro 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:
ChapterPage #DescriptionDate AddedChapter 2: Programming with PHP50Line 65 of Script 2.4 is missing echo $greeting;. The code in Step 8 on page 52 is correct.February 7, 2016Chapter 3: Creating Dynamic Web Sites107The second line of code under Step 3, and line 30 of Script 3.10 on page 106, should use multiplication, not division: $dollars = $gallons * $ppg;.October 9, 2011Chapter 6: Database Design191Step 1 should have you access the “forum” database, not “forums”.February 7, 2016Chapter 6: Database Design193Step 6 should suggest that you repeat Steps 3-5.April 5, 2012Chapter 7: Advanced SQL and MySQL205The first sentence of the third paragraph should say “This join is selecting two columns…".October 9, 2011Chapter 7: Advanced SQL and MySQL210The query in Step 3 is missing the % before the “Y” (as in the figure). This error is also repeated in the final tip on page 211.January 2, 2013Chapter 9: Using PHP with MySQL277The code in Step 8, which assigns the query to the $q variable is missing its terminating double quotation mark. The corresponding code in Script 9.3 is correct.February 16, 2012Chapter 10: Common Programming Techniques320In the first paragraph, it should say “the first ten records—0 through 9—should be retrieved”.February 16, 2012Chapter 11: Web Application Development334The code in Step 6 should end with a closing PHP tag.January 2, 2013Chapter 11: Web Application Development354The code in Step 8 is missing the closing .January 2, 2013Chapter 11: Web Application Development360The code in Step 9 is missing the readfile() line included in the corresponding script.January 2, 2013Chapter 11: Web Application Development361The second tip in the left column says “Chapter 17” but should really say “Chapter 18”.February 3, 2016Chapter 12: Cookies and Sessions389On line 19 of Script 12.8, the opening
\[ is missing after **$data**. The corresponding code in Step 2 is correct.March 14, 2012Chapter 13: Security Methods403The second sentence at the top of the right-hand column should identify Chapter 14 as "Perl-Compatible Regular Expressions".June 13, 2012Chapter 13: Security Methods405The parenthetical near the end of the first paragraph should say "i.e., $v was found in $value".August 28, 2012Chapter 13: Security Methods405On line 58 of Script 13.1, the **$scrubbed** array should be reset instead of **$\_POST**, as this new array is what the form will use.May 1, 2012Chapter 14: Perl-Compatible Regular Expressions450The first line of the second paragraph should begin "Of these modifiers,"January 2, 2013Chapter 16: An OOP Primer514On lines 79-80 of Script 16.5, the form elements should be named just "start" and "end". The code in the corresponding step is correct.January 2, 2013Chapter 17: Example—Message Board530Step 2 is missing **session\_start();** as the first line of code, corresponding to Script 17.1, line 14.February 3, 2016Chapter 18: Example—User Registration563At the end of Script 18.2, the phrase "paste code here" should not be there. Ugh.December 8, 2011Chapter 18: Example—User Registration586The code in Step 2 should refer to **$\_GET\['x'\]** not $trimmed\['email'\] (that’s what I get for copying and pasting). The code in the corresponding script is correct.March 3, 2012Chapter 18: Example—User Registration598Figure E is incorrect.January 8, 2012Chapter 18: Example—User Registration599Script 18.11, line 7, the comment should refer to user_id, not first_name.February 3, 2016Chapter 19: Example—E-Commerce621On line 138 of Script 19.2, the two references to $_POST\['existing'\] should be to $_POST\['artist'\]. This also applies to the code in Step 15 on page 627.December 8, 2011Chapter 19: Example—E-Commerce635On line 35 of Script 19.6, the closing is missing. This also applies to the code in Step 5 on page 636.January 2, 2013
