Re: using new AUTOGLOBALS

From: Date: Fri, 05 Apr 2002 18:03:32 +0000
Subject: Re: using new AUTOGLOBALS
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91761@lists.php.net to get a copy of this message
On Fri, 5 Apr 2002, cyberskydive wrote: > So I wanna learn how to code properly with register_globals off, I reead on > PHP.net about the new auto globals and inmy new php4.1.2 windows > installation using php.ini-rec edited according to the intall.txt file, and > a few changes from books I have (upload tmp dir etc) I'm off to learn how to > use the new auto globals. I've tried $_REGISTER and $_POST . Here is what I > tried as a simple test. > > <form method="post" action="somefile.php"> > <input type="text" name="is_name"> > <input type="submit"> > </form> > > --somefile.php-- > > <? > > print("$_REGISTER["is_name"]"); > or > print("$_POST["is_name"]"); > > ?> Two problems. 1) It's $_REQUEST, not $_REGISTER 2) Take the outermost quotes off the argument to your print, like so: print $_REQUEST["is_name"]; miguel

« previous php.general (#91761) next »