[clug] PHP5 - POST variables not being sent

Tim Murphy tim at murphy.org
Sat Sep 30 17:31:37 GMT 2006


Changed the code to method="POST" but it still doesn't work.  I had a
look at the log file and this is the only line that is added:

61.9.204.9 - - [01/Oct/2006:03:14:24 +1000] "POST /post.php HTTP/1.1"
200 376 "<destination url" "Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"

The following line is entered into the log file if I use GET instead of
POST:

61.9.204.9 - - [01/Oct/2006:03:25:56 +1000] "GET
/post.php?1=1&2=2&3=3&4=4&5=5&submit=Submit+Query HTTP/1.1" 200 469
"<destination url>" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"

where 61.9.204.9 is the IP address of my internet connection.

If anyone has any ideas about this, please let me know.

Thanks in advance.

Tim



-----Original Message-----
From: linux-bounces+tim=murphy.org at lists.samba.org
[mailto:linux-bounces+tim=murphy.org at lists.samba.org] On Behalf Of
Tarrant
Sent: Saturday, 30 September 2006 5:05 PM
To: linux at lists.samba.org
Subject: RE: [clug] PHP5 - POST variables not being sent

Just some really picky HTML stuff here that could, but probably isn't
the
problem...

Method="POST" rather than method=POST

It seems strange that it would work on one server, but not the next. I'd
say
check some log files perhaps?

-----Original Message-----
From: linux-bounces+tarrant=aeria-design.com at lists.samba.org
[mailto:linux-bounces+tarrant=aeria-design.com at lists.samba.org] On
Behalf Of
Tim Murphy
Sent: Saturday, 30 September 2006 1:45 PM
To: CLUG
Subject: [clug] PHP5 - POST variables not being sent

Hi all,
 
I have recently moved a website to a new server, and now no $_POST
variables are being sent.  I have set up a test script as follows:
 
<?PHP
            echo "<HTML><BODY>";
            echo "<pre>";
            print_r($_POST);
            echo "</pre>";
 
?>
 
<FORM method=POST action="<?PHP echo $_SERVER['PHP_SELF']; ?>">
            <INPUT type="TEXT" name="1"><BR>
            <INPUT type="TEXT" name="2"><BR>
            <INPUT type="TEXT" name="3"><BR>
            <INPUT type="TEXT" name="4"><BR>
            <INPUT type="TEXT" name="5"><BR>
            <INPUT type="SUBMIT" name="submit"><BR>
</FORM>
</BODY></HTML>
 
 
When I run the script from my computer, I get the output:
 
Array
(
    [1] => var1
    [2] => var2
    [3] => var3
    [4] => var4
    [5] => var5
    [submit] => Submit Query
)
 
However, when I run this from the new server, I always get
 
Array
(
)
 
Any ideas anyone?  $_GET variables work fine, as do $_SESSION variables.
 
Thanks in advance
 
Tim
 
-- 
linux mailing list
linux at lists.samba.org
https://lists.samba.org/mailman/listinfo/linux

-- 
linux mailing list
linux at lists.samba.org
https://lists.samba.org/mailman/listinfo/linux




More information about the linux mailing list