“PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” (4th Edition) Errata

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:

Chapter Page # Description Date Added
Chapter 3: Creating Dynamic Web Sites 107 The 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, 2011
Chapter 6: Database Design 193 Step 6 should suggest that you repeat Steps 3-5. April 5, 2012
Chapter 7: Advanced SQL and MySQL 205 The first sentence of the third paragraph should say “This join is selecting two columns…”. October 9, 2011
Chapter 7: Advanced SQL and MySQL 210 The 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, 2013
Chapter 9: Using PHP with MySQL 277 The 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, 2012
Chapter 10: Common Programming Techniques 320 In the first paragraph, it should say “the first ten records—0 through 9—should be retrieved”. February 16, 2012
Chapter 11: Web Application Development 334 The code in Step 6 should end with a closing PHP tag. January 2, 2013
Chapter 11: Web Application Development 354 The code in Step 8 is missing the closing </li>. January 2, 2013
Chapter 11: Web Application Development 360 The code in Step 9 is missing the readfile() line included in the corresponding script. January 2, 2013
Chapter 12: Cookies and Sessions 389 On line 19 of Script 12.8, the opening [ is missing after $data. The corresponding code in Step 2 is correct. March 14, 2012
Chapter 13: Security Methods 403 The second sentence at the top of the right-hand column should identify Chapter 14 as “Perl-Compatible Regular Expressions”. June 13, 2012
Chapter 13: Security Methods 405 The parenthetical near the end of the first paragraph should say “i.e., $v was found in $value”. August 28, 2012
Chapter 13: Security Methods 405 On 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, 2012
Chapter 14: Perl-Compatible Regular Expressions 450 The first line of the second paragraph should begin “Of these modifiers,” January 2, 2013
Chapter 16: An OOP Primer 514 On 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, 2013
Chapter 18: Example—User Registration 563 At the end of Script 18.2, the phrase “paste code here” should not be there. Ugh. December 8, 2011
Chapter 18: Example—User Registration 586 The 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, 2012
Chapter 18: Example—User Registration 598 Figure E is incorrect. January 8, 2012
Chapter 19: Example—E-Commerce 621 On 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, 2011
Chapter 19: Example—E-Commerce 635 On line 35 of Script 19.6, the closing </a> is missing. This also applies to the code in Step 5 on page 636. January 2, 2013