
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:
Click on a column heading to sort the table by that column.
| Chapter | Page # | Description | Date Added |
|---|---|---|---|
| 1: Introduction to PHP | 6 | The first word in the last paragraph in the sidebar should be “An” not “As”. | February 18, 2008 |
| 1: Introduction to PHP | 14 | In the second bullet point, it should say that a variable’s name can contain a combination of letters, numbers, and the underscore. | February 18, 2008 |
| 1: Introduction to PHP | 28 | In the code in Step 2, an apostrophe is missing. The code should be: define (‘TODAY’, ‘August 28, 2007′); The code in the corresponding script is correct. | January 26, 2008 |
| 1: Introduction to PHP | 30 | On line five, it should say …examples used so far…. | May 19, 2008 |
| 2: Programming with PHP | 34 | In the URL in the sidebar, there’s an extraneous space between “script.” and “php?”. | February 18, 2008 |
| 2: Programming with PHP | 46 | The CSS code is missing a semicolon after color: #C00. Although the semicolon is optional for the last item in a block, it should be there to be consistent. | May 25, 2010 |
| 2: Programming with PHP | 61 | The last line of code in the right-hand column should refer to “Primes” plural: {$numbers['Primes'][0]}. | May 19, 2008 |
| 2: Programming with PHP | 65 | The last paragraph of the sidebar should refer to the $s2 variable, not $string2. | February 18, 2008 |
| 3: Creating Dynamic Web Sites | 85 | In the paragraph under Step 2, the last sentence should start This variable will correlate…. | July 9, 2008 |
| 3: Creating Dynamic Web Sites | 89 | In the code at the end of the left-hand column, there’s an extra closing parentheses after ($gender == ‘F’). | January 26, 2008 |
| 3: Creating Dynamic Web Sites | 89 | In the right-hand column, the second word of the second paragraph (not including the code) should be “here”, not “hear”. | January 26, 2008 |
| 3: Creating Dynamic Web Sites | 89 | In the second block of example code in the right-hand column, the third line is missing a closing double quotation mark. It should be echo “<option value=\”$y\”"; | January 19, 2009 |
| 3: Creating Dynamic Web Sites | 98 | The last paragraph before the numbered steps should say there’s no way to pass $msg a value. | April 15, 2008 |
| 4: Introduction to MySQL | 118 | There should not be a space between the hyphen and the letter “u” in the first bullet. | May 19, 2008 |
| 5: Introduction to SQL | 137 | The SQL command in the second tip should end with WHERE last_name LIKE ‘_smith%’. | February 18, 2008 |
| 5: Introduction to SQL | 146 | The last sentence of the first paragraph should read …MySQL functions in other types…. | July 9, 2008 |
| 5: Introduction to SQL | 147 | In Table 5.2, the Usage value for the second item should begin as “CONCAT_WS(…”. | February 18, 2008 |
| 5: Introduction to SQL | 147 | In Table 5.2, the Returns value for the last item should say that the string indexing begins at 1, not 0. | February 18, 2008 |
| 6: Advanced SQL and MySQL | 170 | The > on the third line of the SQL command should not be there This should instead be an indentation of the previous line, indicating a continuation. | May 24, 2009 |
| 6: Advanced SQL and MySQL | 172 | In the third sentence in the right-hand paragraph, “troutocity” should be “troutster”. | October 25, 2008 |
| 6: Advanced SQL and MySQL | 179 | The last sentence in Step 2 should say that “An outer join is used…”. | February 18, 2008 |
| 6: Advanced SQL and MySQL | 179 | The query in Step 2 should actually end GROUP BY (users.user_id). As written in the book, only one user without posts will be returned. The same change applies to Figure 6.24. | November 5, 2008 |
| 6: Advanced SQL and MySQL | 182 | In the second paragraph in the right-hand column, “doesn’t not” should just be “does not”. | October 25, 2008 |
| 6: Advanced SQL and MySQL | 185 | In the first block of example code in the right-hand column, the second colum1name should be column2name. | February 14, 2009 |
| 6: Advanced SQL and MySQL | 191 | In the paragraph after the last bullet, it says that the next series of steps will demonstrate how to return Boolean FULLTEXT search results in order of relevance. That section got cut out of the book, unfortunately. | May 25, 2010 |
| 7: Error Handling and Debugging | 207 | The code in Step 1 omits the <h2>Testing Display Errors</h2> that is in the corresponding script. | April 15, 2008 |
| 8: Using PHP with MySQL | 224 | In Script 8.1, the opening HEAD tag on line 3 erroneously has a quotation mark. | July 9, 2008 |
| 8: Using PHP with MySQL | 236 | The first line of code in Step 9 should read mysqli_close($dbc);. The corresponding script is correct. | April 15, 2008 |
| 8: Using PHP with MySQL | 236 | There’s an extraneous >> in the fourth line of code under step 10. The corresponding script is correct. | May 24, 2009 |
| 8: Using PHP with MySQL | 237 | Not a huge deal, but in a couple of places, the email input in the HTML form has a maxlength of 80, whereas the defined column in the database has a maximum length of 60. | November 1, 2009 |
| 8: Using PHP with MySQL | 252 | Line 18 of Script 8.7 should begin with $e = …. The corresponding code in Step 4 on page 253 is correct. | January 26, 2008 |
| 9: Common Programming Techniques | 266 | The header in Figure 9.3 should be “Delete a User”. | May 19, 2008 |
| 9: Common Programming Techniques | 275 | The first line of code under Step 12 should refer to MYSQLI_NUM (all in uppercase). The corresponding script is correct. | April 15, 2008 |
| 9: Common Programming Techniques | 280 | The comment in the last line of code in Step 5 should say that it’s the end of the “p” IF. The corresponding code in the script is correct. | February 14, 2009 |
| 9: Common Programming Techniques | 281 | On lines 9 and 10 of the first paragraph under step 6, it should say The second page would show records 10 through 19; the third, 20 through 29; and so forth. | May 19, 2008 |
| 10: Web Application Development | 309 | Line 24 of Script 10.3 inadvertently include ‘image/jpeg’ twice. This also applies to the code in Step 3 on page 310. | April 15, 2008 |
| 10: Web Application Development | 311 | The echo statement in Step 5 should just read echo ‘<p class=”error”>Please upload a JPEG or PNG image.</p>’; . The code in the corresponding script is correct. | April 15, 2008 |
| 10: Web Application Development | 312 | The MAX_FILE_SIZE hidden input in Script 10.3 on line 85 should end with a space and a slash to be XHTML compliant. This also applies to the code in Step 10 on page 314. | October 25, 2008 |
| 10: Web Application Development | 324 | The second-to-last line of text should refer to the $name variable not the $name function. | April 15, 2008 |
| 11: Cookies and Sessions | 357 | In the paragraph that begins Another change you…, the word “the” is repeated. | April 15, 2008 |
| 11: Cookies and Sessions | 359 | Line 9 of Script 11.13 and the corresponding code in Step 5 needs one more closing parentheses. | February 18, 2008 |
| 12: Security Methods | 364 | Line 59 of Script 12.1 has an extraneous character before the word “form”. | May 25, 2010 |
| 12: Security Methods | 369 | On the fourth line of the sidebar, “even form a database” should be “even from a database”. | October 25, 2008 |
| 12: Security Methods | 383 | In line 13 of the first paragraph, it should say “…view the data in its…”. | January 19, 2009 |
| 13: Perl-compatible Regular Expressions | 392 | The two uses of print in Step 5 should actually be echo, to match the code in Script 13.1. | November 1, 2009 |
| Introduction | 393 | The first line of code under step 6 should be a closing curly brace, as found on line 29 of Script 13.1 | May 24, 2009 |
| 13: Perl-compatible Regular Expressions | 397 | There should not be a space between the comma and the y in the fifth entry of Table 13.2. | November 1, 2009 |
| 13: Perl-compatible Regular Expressions | 411 | The second sentence in the caption to Figure 13.24 does not apply to the image and should be deleted. | November 1, 2009 |
| 14: Making Universal Sites | 430 | When creating or altering tables, you should declare the collation using the keyword COLLATE, not COLLATION. | November 1, 2009 |
| 14: Making Universal Sites | 437 | In the sidebar, the three references to the set_locale() function should be setlocale(), without an underscore. The same goes for ucwords(), in the right-hand column. | October 25, 2008 |
| 15: Example–Message Board | 478 | Line 41 of Script 15.7 should refer to $_SESSION['lid'] instead of $lid. The change also applies to the corresponding code in Step 6 on page 479. | November 1, 2009 |
| 16: Example–User Registration | 491 | Line 21 of Script 16.3 should end with a slash after www.example.com. | July 9, 2008 |
| 16: Example–User Registration | 492 | Line 50 of Script 16.3 should begin echo ‘<div class=”error”>’. | November 1, 2009 |
| 16: Example–User Registration | 509 | On line 13 of Script 16.7, and on line 8 of the code in Step 2, there’s a closing parentheses missing. The correct line should be if (isset($_GET['y']) && (strlen($_GET['y']) == 32) ) { | January 26, 2008 |
| 16: Example–User Registration | 510 | Line 29 of Script 16.7 and the corresponding code in Step 4 on page 511 should not have the closing </font> tag. | October 25, 2008 |
| 16: Example–User Registration | 523 | The last sentence in the explanation for Step 7 should say “email address” instead of “password” (twice). | October 25, 2008 |
| 16: Example–User Registration | 528 | The first sentence in the second paragraph of the sidebar should say that the footer file creates the links. | November 1, 2009 |
| 17: Example–E-Commerce | 542 | Lines 163 and 182 of Script 17.1, and the corresponding code under Step 16 on page 549 and Step 18 on page 551, are missing the space before /> to make the page XHTML compliant. | November 1, 2009 |
| 16: Example–User Registration | 555 | The code in step 5 is actually a repetition of the last two lines of code in step 4. | May 19, 2008 |
| 17: Example–E-Commerce | 580 | The heading at the top of the page should say “To create checkout.php:”. | May 25, 2010 |
| 17: Example–E-Commerce | 582 | Line 55 of Script 17.10 should not be commented out. The code in the corresponding steps is correct. | February 14, 2009 |

p 180 should be “maximum”, not “minimum”
Thanks for your suggestion, but no. It should be “minimum”. MySQL guarantees that AT LEAST 16 indexes can be created on a table, regardless of the storage engine. The “maximum” number of indexes that can be created differs from one storage engine to the next.
You are right, my mistake.
There should be a br / after the / b to make the word “Comments” sit on top of the box.
No, actually, that’s not necessary. In Figure 2.5, the word “Comments” just appears on top of the textarea because the window has been resized.
Larry
I have tried your suggestion but I can’t seem to get it to work.
Okay, how about trying my often-repeated suggestion of posting a message in the support forum so that I, and others, can assist?
Good Morning Sir. I have a problem on Script 8.7.
Actually, I’ve checked this script many times, I already checked the step 4 “errata”. But anyway, I still have a problem! Looks like the script doesn´t match the password with the email, so I get the error ” The email address and password do not match those on file.” There is any new errata for this script?
Thanks a lot!
Regards from Brazil!
There are no new errors for this script. You’ll need to debug why your version is not working. If you need assistance, please use the support forums.
Hi Larry,
I noticed a syntax erro on page 309, where the closing ‘ ; ‘ for the error class on line 10 is missing. Im not sure if this makes a difference to the rest of the code, but I thought to point it out.
You’re allowed to omit the semicolon for the last property in a CSS rule, but for consistency sake it should be in there. Thanks for pointing that out!
Hi Larry,
great book, I value reading each and every page!
I believe the register.php listing is missing a mysqli_close($dbc) in chapter 8, p.233, script 8.3, line 85.
The same applies to p.236, step 10, between the curly brackets of lines 14 and 15.
It’s been corrected in the downloadable script version, though.
Edit: sorry, my mistake. Please ignore my previous message. I was too quick on the draw and commented before reading p. 246. That’ll teach me to read the _entire_ chapter before posting.
No problem, Mike. And thanks for the nice words on the book!
Hi Larry,
I’m going through the painstaking process of making notations in the book re: errata, and I’m noticing something curious: In my copy of the book, I’m seeing some later “Date Added” errata already corrected, whereas some earlier “Date Added” errata still needing my notations from your list. I’m just wondering how that would happen. In other words, you might have some errata here dated from 2009 that’s actually CORRECT in my book, but something you date from 2008 that still needs correcting and hence requiring my notation on the respective page. Weird.
Additionally — and I don’t know that you can answer this– but the back cover of my book says “FREE Online Edition with purchase of this book. Details on Last Page –>” I don’t see any such information inside on the last page(s). Any ideas?
Thanks.
Hello Rick,
Thanks for your questions. As for the errata, that can happen if either I or the publisher didn’t do a good job of managing the corrections. As for the free online edition, unfortunately I know nothing about this at all (I know people are buying books that say that, but I don’t know any of the details). You’ll have to contact the publisher to find out how to get your free electronic version.
Hi again,
Thanks for answering on the errata issue, and thanks for actually POSTING errata! It could easily save a lot of head scratching and debug time. It would be great if all authors did that, but that again seems to be the kind of thing that sets you apart from many others.
I figured you couldn’t answer about the free online thing. I’ve already put in a question to Peachpit about it and I’ll wait to see what they say.
Hey Rick. You’re quite welcome. I do what I can!
Chapter 10, page 316, 317. Step 1 states the inclusion of the and then step 2 asks you to do it again. In the script itself (10.4) the script call is only done once.
Reading the Kindle edition, so I don’t have page numbers. In Step 5 for Script 8.7, the wrong code is inserted into the step. It’s actually identical to the code given in Step 6 (instead of what goes between steps 4 and 6). The corresponding script is still correct.
Okay. Sorry about that but thanks for letting me know.