Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
|
BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
This is the forum to discuss the Wrox book PHP and MySQL: Create-Modify-Reuse by Timothy Boronczyk, Martin E. Psinas; ISBN: 9780470192429
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2009, 07:48 PM
Authorized User
 
Join Date: Jul 2009
Posts: 77
Thanks: 4
Thanked 6 Times in 6 Posts
Default Chap 2, Some small errors in add_post.php and view.php

Chapter 2. Some small errors in add_post.php and view.php


PROBLEM #1

Ending anchor tag </a> is missing in the following places.


1. view.php page 49, first gray box, 9th line from the bottom

Code:
echo htmlspecialchars($row['SUBJECT']) . '</li>';
should be

Code:
echo htmlspecialchars($row['SUBJECT']) . '</a></li>';
2. view.php page 53, about 19th line from the top.
(This is just a repeat of the above as the book shows us parts of the
file, then the complete file.)

3. view.php page 53, about 9th line from the bottom

Code:
echo htmlspecialchars($row['DESCRIPTION']) . '</li>';
should be

Code:
echo htmlspecialchars($row['DESCRIPTION']) . '</a></li>'
I notice the download code has this problem as well.


If you don't change these, everything after the anchor tag will
be highlighted, until it hits the next anchor tag. I
noticed this because I had debugging statements in between the posts
and they were getting highlighted too.


PROBLEM #2


It looks like they mistakenly copied the message "Invalid forum id"
to places where it should say "Invalid message Id".

Code:
die(<p>Invalid forum id.</p>);
Should be

Code:
die(<p>Invalid message id.</p>);
Here are the 4 places I see it.

file add_post.php page 44 The first gray box, 3rd line from the bottom.

file add_post.php page 45 10 lines from the bottom.

view.php page 47, 7 lines from the bottom

view.php page 51, 17 lines from the top.

In the download code they have taken this message out.





Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Pro Chap 3 wozza1664 Pro PHP 1 June 23rd, 2008 03:05 PM
Pro PHP Chap 15 kgmcmillen Pro PHP 1 April 20th, 2006 02:38 PM
chap. 12 -cmstables.php niy BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 January 12th, 2005 02:36 PM
Chap 9 - Charedit.php IP076 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 December 1st, 2004 08:17 PM
Chap. 11 - Try It Out, Session Tracking with PHP Tachyon BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 June 17th, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.