Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 22nd, 2009, 08:48 PM
Authorized User
Points: 374, Level: 6
Points: 374, Level: 6 Points: 374, Level: 6 Points: 374, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2009
Location: San Jose, Californina
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Pro Chap 3 wozza1664 Pro PHP 1 June 23rd, 2008 04:05 PM
Pro PHP Chap 15 kgmcmillen Pro PHP 1 April 20th, 2006 03: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 03:02 PM



All times are GMT -4. The time now is 01:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.