Re: Fixed: Simple form not passing variables

From: Date: Mon, 15 Jan 2001 17:27:01 +0000
Subject: Re: Fixed: Simple form not passing variables
Groups: php.general 
Request: Send a blank email to php-general+get-34635@lists.php.net to get a copy of this message
Thanks!, I was getting bogged down in variable declaration, OOP, etc. This works perfectly: Please enter user name here: <FORM> <INPUT TYPE=text NAME=name> <INPUT TYPE=submit VALUE=Submit> </FORM><BR> You typed: <? print $HTTP_GET_VARS["name"]; ?> >>> Within your configurations, is register_globals on? I try this code and it works just fine. Although if register_globals setting in php.ini is off it will not, try replacing : echo ($name); with print $HTTP_GET_VARS["name"]; And see what happens. If you want $name type variables to register as global, then turn the setting to on. Strangly, iirc, this should be on by default though. The fact that you have name=Bob in url would suggest this to be the "problem". Read about these settings here : http://www.php.net/manual/en/configuration.php#ini.register-globals Philip Olson http://www.cornado.com/ >>> __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/

« previous php.general (#34635) next »