View Single Post
  #1 (permalink)  
Old May 4th, 2004, 07:41 AM
laxenai laxenai is offline
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default POST method behave strangely

Hello,

I am using a Linux Red Hat OS + PHP 4.3.0 + Apache

I got a problem with HTML form and PHP POST method wich work strangely.

<form action="b.php" method="post">
     <input name="entry1" type="text">
     <input value="GO" type="submit">
</form>

In the 'b.php' script i do :
<?
echo "\$_POST['entry1'] = {$_POST['entry1']} <br>";
?>

the result is (i typed '42' as the value to display) :
$_POST['entry1'] = 42Entry1=42; //it glues both variable name+value

It does works well with GET method, but not with POST. The phpinfo() method shows that the _POST variable =>'42Entrey1=42'<= and that the QUERY_STRING variable is empty (wich is not true with the GET method wich works properly)...

What's wrong ?
Thank you
Reply With Quote