Re: Saving state script

From: Date: Tue, 18 May 2004 00:42:16 +0000
Subject: Re: Saving state script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186445@lists.php.net to get a copy of this message
* Thus wrote jah013@yahoo.com (jah013@yahoo.com): > > My local setup is Win98SE, Apache 2.0.49 and PHP 4.3.6. The remote server > is Linux 2.4.20, Apache 1.3.29, and PHP 4.3.3. > > Matt's version of the script is at: > > > http://www.samspublishing.com/articles/article.asp?p=29587&seqNum=7 > > If anyone has any clues to this mystery, it would be a help. This demo script is a victim of register_globals assumed to be on, as expected with older scripts. You can add this line to the top of the script to be portable in either case: import_request_variables('GPC'); Or (prefered) re-write lines 5-12: if (isset($_GET['guess'])) { $guess = $_GET['guess']; } else { $guess = null; } if (is_null($guess) ) { $message = "Welcome to the guessing machine!"; } elseif ($guess > $num_to_guess) { ... Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#186445) next »