[Effortless E-Commerce with
PHP and MySQL](/books/effortless-e-commerce-with-php-and-mysql/)
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:
\[php\]\[/php\]\[php\]\[/php\]\[php\]\['user\_admin'\]\[/php\]November 9, 20104: User Accounts74The backslash preceding the first line of code shouldn’t be there.November 29, 20104: User Accounts87In Step 9, the query should make use of the get_password_hash() function, not create_password_hash().November 30, 20104: User Accounts91The first bit of code should include a file named login.inc.php.November 29, 20104: User Accounts97The prompt in Step 1 should say “text editor or IDE”.August 28, 20125: Managing Site Content110The label for attribute value in Step 14 should be title.January 11, 20115: Managing Site Content132Step 1 should say that the file being created is named view_pdf.php.January 3, 20116: Using PayPal151The prompt in Step 1 should say “PayPal Sandbox Test Site”.August 28, 20127: Second Site: Structure and Design166The first sentence under the caption “Product Tables” should begin “Six product-related tables…".May 20, 20118: Creating a Catalog211The code at the top of the page, as part of Step 4, should have one more closing curly bracket, which completes the conditional begun in Step 3.July 19, 20118: Creating a Catalog224The two references to the get_sale_price() function should be just get_price().December 22, 20109: Building a Shopping Cart239The conditional in the ternary operator in line 4 of the code under Step 12 needs to be updated per the explanation in this forum posting.June 23, 20119: Building a Shopping Cart245The conditional in the ternary operator in line 11 of the code needs to be updated per the explanation in this forum posting.June 23, 20119: Building a Shopping Cart248The get_shipping() function ought not to apply number formatting to the calculated shipping. As written, if the shipping is more than $999 (which, yes, is unlikely but still…), the query that inserts the order into the database, which includes the shipping, will fail because of the comma used to break up thousands. Ideally the function should return an unformatted number (or just formatted to two decimals), leaving the view script to format it as needed.August 28, 201110: Checking Out253Reports have it that Authorize.net has changed how they handle the creation of test accounts. According to one reader, now Authorize.net provides your API Login ID and Transaction Key online, after logging into the Authorize.net system (the information is not provided via email).June 23, 201110: Checking Out289In the code for Step 4, the single quotation marks are missing around the array index in $_POST\['cc\_number'\].April 2, 201110: Checking Out290The errors array referenced in Step 8 should be $billing_errors not $shipping_errors.October 23, 201010: Checking Out298The response variable referenced in Step 10 should be $response not $post_response.October 9, 201111: Site Administration342Step 4 should include **$r = mysqli_query($dbc, $q);**February 22, 201111: Site Administration347Under Step 11, all five TH elements are incorrectly closed.November 30, 2010