Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- strange POST vs GET behaviour
December 27, 2006, 7:46 pm
rate this thread
I have set up my first Linux box. But I experience some strange POST
behaviour. Maybe this is a know bug or maybe I have done something
wrong with my setup. But I just can't seem to find any solution about
it on google.
I have the following two scripts:
<form name="input" action="2.php" method="post">
to pass: <input type="text" name="pass">
<input type="submit" value="Submit">
echo "passed: ".$_POST['pass'];
This results in:
Notice: Undefined index: pass in /var/www/2.php on line 3
The above script doesn't pass the POST. But when I change it to GET it
does get passed to 2.php. Does anyone have an idea?
I am using:
- Janwillem Borleffs
December 28, 2006, 12:44 am
Re: strange POST vs GET behaviour
Check the output of phpinfo() to see if it gets anywhere. Also, check the
output of both $HTTP_POST_VARS and $_REQUEST['HTTP_POST_VARS'].
Perhaps you upgraded from a pre-4.2 version and some old bits and pieces
where left. You can also try to rename the php.ini file to php.ini.old and
restart your webserver. After this, PHP should resort to its defaults as it
will not be able to locate the php.ini file.