“PHP for the World Wide Web: Visual QuickStart Guide” (2nd 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:

Click on a column heading to sort the table by that column.

Chapter Page # Description Date Added
1: Getting Started with PHP 19 The last line of code in Step 5 should not have the grey arrow (indicating a continuation of the previous line). June 25, 2004
Introduction 56 In Script 3.5, receive is misspelled on line 14. November 7, 2004
4: Using Numbers 71 On line 14 of Script 4.2, the word ‘handling’ is misspelled. April 1, 2007
4: Using Numbers 76 For the final example of the round() function, the answer should be 236 not 236.27 as the function rounds to zero decimals if provided with no rounding parameter. February 27, 2004
4: Using Numbers 78 In Step 1, it erroneously states to open the numbers.php script. The script to be opened is actually handle_calc.php. February 18, 2004
4: Using Numbers 84 In the last line of the first Tip, it should say see this in older scripts. March 16, 2005
5: Using Strings 97 The word “handling” is misspelled on line 11 of Script 5.3. July 10, 2007
5: Using Strings 99 In the last tip, the wordwrap() function is mistakenly referred to as word_wrap(). November 18, 2004
5: Using Strings 106 The fourth tip should refer to str_ireplace(). July 20, 2004
5: Using Strings 109 On the line 5 of the first paragraph, it should say handles spaces in odd ways. (There’s an extra “s” on “odd”). March 14, 2006
6: Control Structures 120 The second line of the isset() example should be:

$v2 = ‘Prior’;

March 3, 2004
6: Control Structures 122 In the second line of the explanation under Step 3, the sentence should read register_globals being turned off. March 11, 2007
6: Control Structures 126 The last word in the third line of the page should be “than”, not “then”. May 14, 2007
6: Control Structures 127 In the last Tip, the checkdate() function is erroneously listed as check_date(). February 9, 2004
7: Using Arrays 159 The comment on line 12 of Script 7.1 has the word handling misspelled. May 9, 2004
7: Using Arrays 162 In the last sentence of the third paragraph, it should read …at that point is overwritten. March 11, 2007
7: Using Arrays 170 In Script 7.4, on line 34, and in Step 7 on page 172, it should say
print “<p>The fourth chapter of my fourth book is…. Figure 7.5 on page 172 is also incorrect.
July 12, 2004
7: Using Arrays 171 In Step 5 and on line 28 of Script 7.4 on page 170, there should not be a comma after $phpmysql. August 18, 2004
7: Using Arrays 177 In the second tip, it should say while maintaining key-value associations. April 15, 2008
8: Creating Web Applications 210 The P and EM tags in Script 8.7 are not nested properly. Line 16 and Step 4 should read </em></p>. April 5, 2004
8: Creating Web Applications 212 Line 4 of Script 8.8 has misspelled handling. August 22, 2004
8: Creating Web Applications 218 Line 4 of Script 8.9 has misspelled handling. August 22, 2004
8: Creating Web Applications 232 The fourth paragraph should state to cancel the execution of the script. March 28, 2004
9: Cookies and Sessions 245 In Step 8, under Font Color, the White option should be

<option value=”#ffffff”>White</option>

The code in the corresponding script is correct.

March 3, 2004
9: Cookies and Sessions 246 The caption to Figure 9.6 should say that the cookie is storing the value of #ooooff. February 25, 2004
9: Cookies and Sessions 260 In the last tip, it should say The rest of the chapter will demonstrate…. March 29, 2004
_10: Creating Functions 272 Line 6 of the second paragraph should read create meaningful function names March 11, 2007
10: Creating Functions 275 In Step 6, the line $year++; is not necessary. This also applies to Script 10.1, line 41. June 17, 2004
10: Creating Functions 280 Line 43 of Script 10.2 is unnecessary and should not be there. July 10, 2007
11: Files and Directories 302 In the second Tip, the permissions are listed incorrectly. Write has a value of 2; read has a value of 4. March 3, 2006
11: Files and Directories 307 In the code for Step 10, and on line 51 of Script 11.1 on page 306, it should say cols=”30″, not “columns”. January 28, 2005
11: Files and Directories 308 In the second Tip it says to look for the “A More Secure File Structure” sidebar later in the chapter. The sidebar is actually on page 299. March 3, 2006
11: Files and Directories 321 Towards the end of the paragraph in Step 6, it should say …place something like this on a public site…/ March 22, 2006
11: Files and Directories 324 In the foreach loop of the sidebar, the => is not needed. The loop should be just
foreach ($files as $item) {.
November 29, 2004
12: Intro to Databases 363 In Script 12.5, on line 48, and in the corresponding Step 8 on page 365, it should be cols=”40″, not “columns”. October 2, 2006
12: Intro to Databases 364 In Figure 12.10, the word “not” is missing in the first sentence. It should read Could not add the entry because…. The corresponding script is correct. June 20, 2006
12: Intro to Databases 382 In the code in Step 9, and in line 54 of Script 12.8 (on the same page), it should refer to “cols”, not “columns” (as in cols=”40″). March 11, 2007
13: Regular Expressions 398 On the third line of the first tip, the parenthetical should read put a backslash before them. March 22, 2006
13: Regular Expressions 406 The regular expression pattern in Step 4, should match that in Script 13.2, using {2,4} instead of {2,3}. July 15, 2004