Re: PHP Form Changes??!!

From: Date: Wed, 19 Jun 2002 12:50:59 +0000
Subject: Re: PHP Form Changes??!!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-102917@lists.php.net to get a copy of this message
lol.. Sorry, that was a misstype. It doesn't work... the error/warning message is.... Notice: Undefined variable: PHP_SELF "Niklas lampén" <niklas.lists@publico.fi> wrote in message news:026501c2178d$8c508530$ba93c5c3@Niklas... Try <?=$PHP_SELF?>. Niklas -----Original Message----- From: James Brisland [mailto:james@brisland.com] Sent: 19. kesäkuuta 2002 14:59 To: php-general@lists.php.net Subject: [PHP] PHP Form Changes??!! Question everyone, Have they changed the way PHP handles forms. ie I used to post a text field through this form <form action="<?$PHP_SELF?>" method="post"> <input type="text" name="name" value="value"> <inpt type="hidden" name="action" value="submited"> <input type="submit" value="Sumbit My Form"> </form> <? if($action == 'submited') { echo "$name : $value"; } ?> But it seems that both using $PHP_SELF and also calling the posted vars by their $name doesn't work. do I now have to do this... if so why the hell did it change?? Regards, one very confused php'er <form action="<?$_SERVER['PHP_SELF']?>" method="post"> <input type="text" name="name" value="value"> <inpt type="hidden" name="action" value="submited"> <input type="submit" value="Sumbit My Form"> </form> <? if($_POST['action'] == 'submited') { echo "$_POST['name'] : $_POST['value']"; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ########################################### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/

« previous php.general (#102917) next »