RE: [PHP] PHP Form Changes??!!

From: Date: Wed, 19 Jun 2002 14:20:25 +0000
Subject: RE: [PHP] PHP Form Changes??!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102939@lists.php.net to get a copy of this message
Read the release notes for the latest PHP version to learn why it changed. You have to use the $_POST, $_GET, $_COOKIE, $_SERVER, $_SESSION, $_ENV arrays now... Or turn on register globals to make it like it was, but make sure you understand why that's not recommended. ---John Holmes... > -----Original Message----- > From: James Brisland [mailto:james@brisland.com] > Sent: Wednesday, June 19, 2002 7:59 AM > 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

« previous php.general (#102939) next »