Wrox Programmer Forums
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 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 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)

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 07: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 05:37 PM
All Array is not returning [Coding Error] vinod_yadav1919 Javascript How-To 0 January 18th, 2005 10:10 AM
Book Error Aleksandr1 BOOK: Professional C#, 2nd and 3rd Editions 0 October 31st, 2003 06:26 PM

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