Page 1 of 1

[SOLVED] method="post" turns to get

Posted: Wed Feb 09, 2005 5:32 am
by Archy
Well, the topic explains it really, I am using the command:

Code: Select all

<form action="home.php" action="post">
...
...
</form>
Yet all the variables get passed through the URL instead of the POST variable. I have tried print_r($_POST), nothing is echo'd (apart from Array ( ) ), howeverm it echo's out the inputs successfully when I use print_r($_GET).

Anyone know what the problem is, this has happened to me a couple of times over the past couple of months, even though I use the form tag hundreds of times, 95% working correctly.

Thanks

Re: method="post" turns to get

Posted: Wed Feb 09, 2005 5:37 am
by n00b Saibot
Archy wrote:

Code: Select all

<form action="home.php" action="post">
...
...
</form>
Yet all the variables get passed through the URL instead of the POST variable.
You never set the method anmywhere you just specified the action i.e. the recieving file. you should change

Code: Select all

<form action="home.php" action="post">
to

Code: Select all

<form action="home.php" method="post">
that's it! :lol:

Posted: Wed Feb 09, 2005 5:39 am
by Archy
/me slaps head