Wrox Programmer Forums
|
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 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 March 23rd, 2004, 05:37 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to webshark
Default

php 4.3.4

how can I fix it?

 
Old March 23rd, 2004, 05:45 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Oh, I just noticed something, on your 5th post, the page that includes does not POST anything.... it just includes.

Also, instead of testing if($_SESSION['index'] == "") you should use if(isset($_SESSION['index']))

That's where you get your first undefined index error, I think.

----------
---Snib---
----------

<><
 
Old March 23rd, 2004, 05:51 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to webshark
Default

yes that is the opening page (index.php) from the book
it supposed to verify if a user has logged on or not and send them to the desired page.

 
Old March 23rd, 2004, 05:58 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I think this is either faulty or outdated code....

I always use isset(), not to see if it == "" - that should give an error if the index is undefined.

Perhaps instead of include, you should use headers, if you want to redirect.

----------
---Snib---
----------

<><
 
Old March 23rd, 2004, 06:02 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to webshark
Default

lol, just for note the book was published 2004.

do you have an example of the isset function?

thanks for your help.

 
Old March 23rd, 2004, 06:09 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

$str1 = "A string!";
$num1 = 52;

if(isset($str1)) echo "It's good!"; //works, $str1 is "A string!"
if(isset($num1)) echo "It's good!"; //works, $num1 is 52
if(isset($var1)) echo "It's good!"; //$var1 was never set, echos nothing

http://php.net/isset

Hope this helps,

----------
---Snib---
----------

<><

P.S. 2004, eh? :)
 
Old March 23rd, 2004, 06:42 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to webshark
Default

okay thanks for help. they seem to need to revise the script in the book as there are many errors on those sections similar to undefined.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter11-ProposalManager.zip Password Protected ? ian BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 2 August 27th, 2008 12:06 PM
Chapter11 page 400 asplundo BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 18th, 2008 09:29 AM
error in chapter11 postcard.php GOUR CHANDRA PAUL BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 December 7th, 2005 07:30 PM





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