Page 1 of 1

get works, post doesn't

PostPosted: 04. October 2008 16:54
by az_wraith
How come I can get the following to work with "GET"
Code: Select all
<form action="test2.php" method="get">
    Name:  <input type="text" name="username" /><br />
    Email: <input type="text" name="email" /><br />
    <input type="submit" name="submit" value="Submit me!" />
</form>


but when I use "POST" it doesn't work
Code: Select all
<form action="test2.php" method="post">
    Name:  <input type="text" name="username" /><br />
    Email: <input type="text" name="email" /><br />
    <input type="submit" name="submit" value="Submit me!" />
</form>

PostPosted: 04. October 2008 18:49
by Wiedmann
We can't say anything, without a detailed error description (what's (not) happens) and the content of "test2.php".

PostPosted: 04. October 2008 19:48
by az_wraith
Nothing is to happen with test2.php.

When I look at the url for test2.php with the "get" I have
test2.php?username=1&email=1

and with "post" just
test2.php

That is kind of telling me "post" is not working.

PostPosted: 04. October 2008 21:08
by Wiedmann
and with "post" just
test2.php

That's exactly what POST is doing
--> the values are not transmitted as GET (URL) params (they are part of the request body, which you can't see).