get works, post doesn't

Problems with the Windows version of XAMPP, questions, comments, and anything related.

get works, post doesn't

Postby az_wraith » 04. October 2008 16:54

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>
az_wraith
 
Posts: 2
Joined: 04. October 2008 16:50

Postby Wiedmann » 04. October 2008 18:49

We can't say anything, without a detailed error description (what's (not) happens) and the content of "test2.php".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby az_wraith » 04. October 2008 19:48

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.
az_wraith
 
Posts: 2
Joined: 04. October 2008 16:50

Postby Wiedmann » 04. October 2008 21:08

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).
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 70 guests