Learning PHP, MySQL, and JavaScript

Errata for Learning PHP, MySQL, and JavaScript

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 Note Update



Version Location Description Submitted By Date Submitted
Printed Page 107
Figure 5-3 Illustration

Figure 5-3 is said to depict a jukebox to illustrate the OOP concepts. However, the image provided is the image for figure 5-2 with the thread attached the nametag that's tucked into the matchbox.

Anonymous  Mar 13, 2015 
Printed Page 163
2nd paragraph and on

The command for starting MySQL from a command prompt in Windows OMITS the necessary "mysql" from the lines C:Program Files\Zend\MySQL51\bin and C:Program Files (x86)\Zend\MySQL51bin also the lines "C:\Program Files\Zend\MySQL\bin" -u root and "C:\Program Files (x86)\Zend\MySQL\bin" -u root

Alan Cameron  Jul 05, 2014 
ePub Page 171
Table 4-2

!= is listed as an Assignment Operator. Should most likely to be |=

Brett Santore  Dec 04, 2013 
Printed Page 255
Pgm listing at top of page

$subresult = $conn->query($query); should be $subresult = $conn->query($subquery);

Anonymous  Jul 08, 2015 
Printed Page 275
Example 12-4

The combination of the smartytest.tpl file (Example 12-4) and Example 12-3 does not work as intended: deleting files does not work. Since deleting (in Example 12.3) is only done after a test that will always fail, the file is never deleted. The test fails because isset($_POST['author']) will never evaluate to TRUE. This also holds for the other tests with 'title', 'category', etc., (but not for 'isbn'). The reason why this is the case is because, in Example 12-4, the only things that are posted are 'delete' and 'isbn'. the part between the section tags should be changed to: {section name=row loop=$results} <form action="smartytest.php" method="post"> <input type="hidden" name="delete" value="yes"> <input type="hidden" name="author" value="{$results[row].author}"> <input type="hidden" name="title" value="{$results[row].title}"> <input type="hidden" name="category" value="{$results[row].category}"> <input type="hidden" name="year" value="{$results[row].year}"> <input type="hidden" name="isbn" value="{$results[row].isbn}"> <pre> Author {$results[row].author} Title {$results[row].title} Category {$results[row].category} Year {$results[row].year} ISBN {$results[row].isbn} <input type="submit" value="DELETE RECORD"></pre> </form> {/section} I'm not knowledgeable enough about Smarty to say it is a bug in the current version, but I would be surprised.

Arthur Sauer  Jan 18, 2016 
Printed Page 296
exampe 12-4, 4th edition

in the 4th edition, in example 12-4, it should be $connection = new mysqli($hn, $un, $pw, $db); in otherwords, it should be like in 4th edition, example 12-3 $connection = new new mysqli($hn, $un, $pw, $db); assuming of course that login.php has these variables set up ($hn, $un, $pw, $db) otherwise, if example 12-4 is left as is currently, the book's reader cannot login. It'll say something like 'database not found'

Anonymous  Aug 25, 2016