Errata
Submit your own errata for this product.
The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question
| Version | Location | Description | Submitted By |
|---|---|---|---|
| Page -- -- |
I'd like to know where I should go from here, after reading the book. I'm mainly interested in OO PHP and Security. Thank you in advance! |
23.12.2012 | |
| Printed | Page 16, 24 in PHP code examples |
The report.html file saves the user's description of the aliens in a form field named "aliendescription". However, the report.php file tries to retrieve that information in variable $alien_description from $_POST['description'] whereas it *should* be $_POST['aliendescription']. |
Linda |
| Other Digital Version | 25 3rd paragraph |
The paragraph says "If there is any PHP code in a web page, it's a good idea to name the file on the web server with .php, not .html". Actually, it is usually required to name it .php to tell the server to parse a script. .html pages will mostly not get parsed and will return the source code of the php script instead. |
Anonymous |
| Page 26 1st paragraph |
One extra "are" in the first sentence. |
Peter McDonald | |
| Printed | Page 33 1st paragraph |
2nd sentence not complete: |
cocoboesch |
| Page 35, 36 Code lines referring to alien_description |
Reference on p. 36, 3rd line of php code is presented as the correct form field name, but is missing underscore between "alien" and "description" that is present in every other instance across these 2 pages. |
Peter McDonald | |
| Page 41 echo code |
Inconsistent form field names between pages using underscores between names here but on previous pages like p. 40 there are no underscores, i.e. "what_they_did" vs. "whattheydid" |
Peter McDonald | |
| Printed | Page 88 Chapter 2 |
The fourth point on the bullet points list contains a reference to the function mysqi_query(). The correct spelling is mysqli_query() |
Maristella |
| Printed | Page 111 3rd paragraph |
the "t" is missing in "execute", the book reads "execue". |
Maristella |
| Printed | Page 125 first question of "there are no dumb questions" |
one "e" is missing in "statement", the book reads "statment". |
Maristella |
| Printed | Page 128 Near the bottom |
The statement: |
XJupiter |
| Printed | Page 171 2nd IF statement |
The text indicates that we want to require input to both the subject and the text fields. The 2nd IF statement only outputs an error message if both fields are blank. The IF statement should use an OR, not an AND. |
DJPJ |
| Printed | Page 171 Validation logic statements |
$_POST['elvismail'] is assigned to the variable $text, but the validation logic statements use the variable $body. |
lemuel |
| Printed | Page 171 full page |
The name of the email body variable is inconsistent. At the top of the page and in the problem solution, it's referred to as $text, but in the logic examples it's referred to as $body. |
Carl Jonard |
| Printed | Page 171 3rd and 4th paragraphs |
There are two errors on this page: |
XJupiter |
| Printed | Page 172 sharpen your pencil |
Continuation of the same problem on page 171. If you use the logic in the book as is, then if subject is blank and text is filled in, no email will be sent and no error message will be given. Same thing if subject is filled in and the text field is blank. |
DJPJ |
| Printed | Page 173-174 Sharpen your pencil |
The same logic error as on 171 and 172. |
DJPJ |
| Printed | Page 179 third and fourth code snippets |
the third and fourth code snippets read |
Maristella |
| Printed | Page 186 Underneath "// We know both $subject AND $text are blank" |
You are missing the echo statement below the following statement: |
XJupiter |
| Printed | Page 188 5th coding line |
The Author is missing one right parenthesis on the 5th coding line. |
XJupiter |
| Safari Books Online | 189 End of Test Drive Description |
There's a question mark missing from the last sentence. |
David Friedman |
| Printed | Page 190 5th coding line |
The Author is missing one right parenthesis on the 5th coding line. |
XJupiter |
| Printed | Page 202 Last sentence in "Check to see if the form has been submitted" section |
"Just make sure the 'submit' matches up with the id attribute of the Submit button in the form code." should say "Just make sure the 'submit' matches up with the name attribute of the Submit button in the form code." |
DJPJ |
| Printed | Page 203 Top right of page (the comment) |
The first line of the comment is incorrect: |
XJupiter |
| Printed | Page 204 Modified form code |
Code as written results in "undefined variable" errors for both $subject and $text the first time the script is run. Setting both variables to null before checking for $_POST['submit'] is one solution: |
lemuel |
| Printed | Page 204 sample code at bottom of page |
Sample code's textarea tag is indented <?php echo $text; ?> on next line, but doing so caused whitespace to be inserted in form's textarea on initial page load. If no body text is entered in the form, the spaces in the textarea still cause the $text variable to be "not empty" and the email is able to be sent despite the user not having entered any text there. |
Anonymous |
| Printed | Page 211 ALTER TABLE statement |
FYI .... I'm running MySQL 5.1.34, and the syntax that worked is: |
DJPJ |
| Printed | Page 227 Left Center Comment |
The comment: |
XJupiter |
| Printed | Page 235 mysql command line screen shot |
sql statement is incorrect uses DESCRIBE email_list; should be DESCRIBE guitarwars; |
Anonymous |
| Printed | Page 235 Test Drive |
Before creating the table, you have to either create a new database, or decide to add the table to an existing database. Then you have to issue the USE statement; then you can run the CREATE TABLE and INSERT statements. |
DJPJ |
| Printed | Page 236 First sentence |
"With a new column added to the high score database,"?? The database is named "gwdb" and the table is named "guitarwars." I think it should say "With a new column added to the guitarwars table," |
DJPJ |
| Printed | Page 242 IF statemetn |
filesize($row["screenshot'] should be filesize($row['screenshot'] |
DJPJ |
| Printed | Page 242 Near bottom of the page |
The following line of code is incorrect: |
XJupiter |
| Safari Books Online | 245 First Paragraph |
Maybe this is clarified later on the text, but it says: |
David Friedman |
| Printed | Page 251 addscore.php code lines with move_uploaded_file |
It almost seems like a page is missing from the book, because it never actually shows you entering in code for a line that includes move_uploaded_file onto the addscore.php, (which makes this whole area confusing) but on page 251, it is there already inserted, while discussing the creation and integration of the GW_UPLOADPATH. |
Jeff |
| Printed | Page 252 answer to making file names unique with adding time() |
Adding the time() function to the $target variable will not work for the web site because it causes the name in the database to be different than the name of the actual picture file that is being saved in the images folder. The time function should be added to the |
Jeff |
| Printed | Page 267 Top right comment |
This line: |
XJupiter |
| Safari Books Online | 268 top |
The description asks for less than the GW_MAXFILESIZE however the code is implemented as less than or equal to GW_MAXFILESIZE. |
David Friedman |
| Printed | Page 269 code sample |
Looks like we are testing for 4 error conditions, but only displaying a message for 3 of them. |
DJPJ |
| Printed | Page 269 Coding near the bottom |
The following line: |
XJupiter |
| Printed | Page 322 ALTER statement |
In my version of MySQL (5.1.34) adding the column 'approved' as TINYINT sets the value to NULL in all existing rows. |
DJPJ |
| Printed | Page 326 Sharpen your Pencil solution |
if ( $row['approved'] == '0') should probably be |
DJPJ |
| Printed | Page 339 Last paragraph /"Exercise" section |
isnumeric should be is_numeric |
Cathy Austin |
| Safari Books Online | 361 3rd grayed part of the code |
in the line of code: |
Sherif Mahmoud |
| Printed | Page 361 3rd gray part |
Seems to be an issue with SQL statements spanning more than one line. |
DJPJ |
| Printed | Page 371 |
When conducting the "Test Drive" and adding a image i was getting an error stating "Notice: Undefined index: file ...editprofile.php line 60" |
jr_holland28 |
| Printed | Page 403 Main Paragraph |
There is a description of the php.ini setting "session.use_trans_id", which should be "session.use_trans_sid", according to the php manual. |
lemuel |
| Printed | Page 403 middle of the paragraph |
Here they talk about "session.use_trans_id". However, it should be "session.use_trans_sid". Small typo. |
David Tang |
| Printed | Page 447 Second SELECT query of PHP & MySQL Magnets on line 6 |
The $query in the book and in the download code is: "SELECT topic_id FROM mismatch_topic ORDER BY category_id, topic_id" |
Rich dev |
| Printed | Page 456 Code section marked with 1 |
The query shows: |
Jim Munro |
| Printed | Page 456 In the code, Second"$query" |
$query is set to equal "SLECT * FROM mistmatch_response ORDER BY category_it, topic_id". |
Anonymous |
| Other Digital Version | 457 in the example code, not in the book I don't think |
In the downloaded code of chapter 7.5 I got an error when submitting my profile picture. |
Jim Munro |
| Other Digital Version | 506 Downloadable SQL Database |
The database does not import properly as it is on the server: entry number 12, Pet Food Tester, has the following description: |
Laurel Raven |
| Printed | Page 508 Solution for "LIKE '%ma'" |
In the magnet exercise solution, it only shows "Human Cannonball" and "Team Mascot" being a match for LIKE '%ma%'; however, since the LIKE term is case insensitive and % matches on anything INCLUDING nothing, it should also list "Matador" as a match. |
Laurel Raven |
| Printed | Page 509 Speach/Thought Bubble at top |
Poor wording choice: |
Laurel Raven |
| Printed | Page 544 Exercise Solution |
I couldn't bring myself to put all that redundant code in my script. |
DJPJ |
| Printed | Page 544 first paragraph |
'sarch' should be 'search' |
DJPJ |
| Printed | Page 546 Test Drive |
When I take the test drive, I get an error "Notice: Undefined index: sort in C:\Inetpub\wwwroot\hfphp\ch09\riskyjobs\search.php on line 109. |
DJPJ |
| Printed | Page 546 Test Drive |
that should appear as $sort = ''; not $sort = ";" |
DJPJ |
| Printed | Page 549 Bottom paragraph, last sentence, above queries |
The last sentence of the paragraph states "For example, here's how you get rows 11 through 25, which would be the third page of results." It should be 11 through 15 as the query is only set to return 5 results beginning at 11. |
Anonymous |
| Printed | Page 552 Code example and downloadable code for chapter |
Hi, me again. |
Jim Munro |
| Printed | Page 554 first paragraph |
oops ... I typoed the page number related to this typo. |
DJPJ |
| Printed | Page 577 (min,max) box |
I think the last sentence should be removed ... "Here we're saying it should appear 2, 3, or 4 times in a row." |
DJPJ |
| Printed | Page 587 Downloaded Source Code |
Similar to error on 552. The registration form attempts to pre-populate the input fields with variables based on the $_POST data. The first time the script is run these variables do not exist and each field shows a php "Undefined variable" error. |
lemuel |
| Printed | Page 618 middle of page |
The description of the imagefilledellipse points to parameters 2 and 3 as width and height, and parameters 4 and 5 as x and y coordinates. It seems as though they are reversed. Parameters 2 and 3 should represent the x and y coordinates and parameters 4 and 5 should represent the width and height. |
tmichael |
| Printed | Page 675 Downloaded Source Code |
Line 49 of index.php has $row[last_name], should be $row['last_name']. |
lemuel |
| Printed | Page 734 2nd paragraph |
The book reads "To determine if you have MySQL on the Mac, open your terminal and type: cd /user/local/mysql |
Anonymous |
| Safari Books Online | 738 the link just above the last paragraph |
It says to get version 6.0 or newer. The MySQL documentation page says, "Note: The MySQL 6.0 Reference Manual has been retired. MySQL 6.0 was not developed beyond Alpha status and new releases have not been made for some time, so the manual has been withdrawn as well." |
kajaco2 |
