RE: [PHP] Will $_GET throw an error? (no problem just doubt)

From: Date: Sat, 03 May 2003 16:28:43 +0000
Subject: RE: [PHP] Will $_GET throw an error? (no problem just doubt)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146282@lists.php.net to get a copy of this message
> I am converting my script to work if register globals are off...I have a > simple question > > I have some variables that may or may not be sent from the server namely > $key (and) > $hash > if one is sent the other wont be...so my question is if i declare both > like > so: > $key = $_GET['key']; > $hash = $_GET['hash']; > but what happens when only one is sent and not the other? will i get an > error/warning or.....? You'll get a Warning about "undefined index" for the one that doesn't exist. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#146282) next »