Re: simple online form stuck at !isset($first) condition

From: Date: Tue, 16 Sep 2003 00:31:06 +0000
Subject: Re: simple online form stuck at !isset($first) condition
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-162687@lists.php.net to get a copy of this message
Dear Curt, Thanks a lot. Is this related to the register_global variable as well? I was stuck at the $request_method and $_SERVER['request_method'] for quite a long time. Wei ----- Original Message ----- From: "Curt Zirzow" <php-general@zirzow.dyndns.org> To: <php-general@lists.php.net> Sent: Tuesday, September 16, 2003 1:22 AM Subject: Re: [PHP] simple online form stuck at !isset($first) condition > * Thus wrote Wei Wang (ww220@cam.ac.uk): > > > > <? function show_form($first="",$last="") { ?> > > > > <form action="formprac.php" method="POST"> > note the method ----------------------^^^^ > > > First Name: > > <input type=text name=first value="<?echo $first?>"> > > <br> > > Last Name: > > <input type=text name=last value="<?echo $last?>"> > > <br> > > > > <input type=submit> > > </form> > > > > <? } > > > > > > if(!isset($first)) { > > make this > if (!isset($_POST['first'])) { > > see: > http://php.net/language.variables > http://us3.php.net/register_globals > > > Curt > -- > "I used to think I was indecisive, but now I'm not so sure." > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#162687) next »