Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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 April 27th, 2009, 02:51 AM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Coding error in the book

There is an error in one of the book's (Beginning PHP5) examples:

In chapter 3, section "The Concept of State", and "Try It Out: Count Page Accesses".

In this "if" statement:

if (isset ($_GET['whichpage']) == $i)

if $_GET['whichpage'] is set, then regardless of the page number ($i), this 'if' will be true! but we just want this for the current page.

The solution can be this one:

if ($_GET['whichpage'] == $i)
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
Is it a good coding pratice? Question on Error Handling. amlesh C# 2008 aka C# 3.0 5 January 18th, 2009 06:15 PM
coding error using checkbox in datagrid vivek_inos ASP.NET 1.0 and 1.1 Professional 4 April 28th, 2008 03:36 PM
accessibility coding error in downloaded file hillcountry BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 0 November 21st, 2006 04:37 PM
All Array is not returning [Coding Error] vinod_yadav1919 Javascript How-To 0 January 18th, 2005 09:10 AM
Book Error Aleksandr1 BOOK: Professional C#, 2nd and 3rd Editions 0 October 31st, 2003 05:26 PM



All times are GMT -4. The time now is 07:16 AM.


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