Re: Will $_GET throw an error? (no problem just doubt)

From: Date: Sat, 03 May 2003 16:38:30 +0000
Subject: Re: Will $_GET throw an error? (no problem just doubt)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146285@lists.php.net to get a copy of this message
Hey John, Thanks for replying. I am not getting any errors now that i have turned register globals off via .htaccess....why is that and how can I turn "error reporting" back on? Also another problem tell me if i got this correct, to make my script run without problems with register globals off I have put $order_number = $_GET['order_number']; $total = $_GET['total']; $key = $_GET['key']; $secret_word="blah"; $seller_id=987987; right on top of my script, then when i run my script and am using it like this $compare2c = strtoupper(md5("$secret_word"."$seller_id"."$order_number"."$total")); after the above line i have some print statements, but when i run the script I dont get the print statements...I just get the html *before* i start my "<?php" and I also get the html after my "?>" what do you think is wrong? with register globals everything is working fine of course. Kindly reply, -Ryan ----- Original Message ----- From: "John W. Holmes" <holmes072000@charter.net> To: "'Ryan A'" <ryan@jumac.com>; <php-general@lists.php.net> Sent: Saturday, May 03, 2003 6:28 PM Subject: RE: [PHP] Will $_GET throw an error? (no problem just doubt) > > 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/ > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#146285) next »