Fw: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form.

From: Date: Tue, 10 Dec 2002 19:04:44 +0000
Subject: Fw: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form.
Groups: php.general 
Request: Send a blank email to php-general+get-127697@lists.php.net to get a copy of this message
What version of PHP are you using? I believe that anything earlier than 4.05 does not support $_POST. Did you try $HTTP_POST_VARS['name']? This will work, regardless of version. ----- Original Message ----- From: "David Scott" <dedoleo@hotmail.com> To: <> Sent: Tuesday, December 10, 2002 12:54 PM Subject: Re: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form. I have corrected the typo and had hoped this was a simple solution, yet $_POST still doesn't work. Any ideas? "Craig Thomas" <craig@januzzithomas.net> wrote in message news:LEELKFJHHCMMHLKJLLOBMEPOCFAA.craig@januzzithomas.net... > Using $_REQUEST[""] works because the vars are in the http request, but > $_POST[""] contains nothing as the other poster noted: mehtod="post" > > >>-----Original Message----- > >>From: David Scott [mailto:dedoleo@hotmail.com] > >>Sent: Tuesday, December 10, 2002 1:20 PM > >>To: php-general@lists.php.net > >>Subject: [PHP] Re: Help please: Unable to get $_POST["variable"]; to > >>work in a form. > >> > >> > >>Using $_REQUEST["variable"] causes the script to work. > >>Why is this? And, why can I not use $_POST? > >> > >>"David Scott" <dedoleo@hotmail.com> wrote in message > >>news:20021210165617.2237.qmail@pb1.pair.com... > >>> I am going through the introductory tutorial on > >>http://www.php.net/ and am > >>> stuck on this page: > >>> http://www.php.net/manual/en/tutorial.forms.php > >>> > >>> I have been able to get all of the examples up to this point to work. > >>> > >>> The form is simple: it asks for a text "name", a text "age" > >>> and has a > >>submit > >>> button. The information is submitted to action.php. > >>> > >>> Action.php contains this code: > >>> Hi <?php echo $_POST["name"]; ?>. > >>> You are <?php echo $_POST["age"]; ?> years old. > >>> > >>> I saved action.php as a text file with only the information above. > >>> > >>> When I enter JoeBob into the name field and 27 into the age field, I get > >>> this for output: > >>> Hi > >>> Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 > >>> . You are > >>> Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 > >>> years old. > >>> > >>> What can I do to remedy this? > >>> > >>> > >> > >> > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#127697) next »