Form POST not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
donny
Forum Contributor
Posts: 179
Joined: Mon Aug 11, 2014 11:18 am

Form POST not working

Post by donny »

Hello,

I have a simple form and I am trying to POST results to the process page but nothing is coming up. I have PHP 5.2.

Code: Select all


<form action=process.php method=post>
<input type=text name=blah>
<input type=submit>
</form>

Code: Select all

first name: <?php print $_GET["blah"]; ?> <br>
this is just an example.

thank you
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Form POST not working

Post by Celauran »

5.2 is really outdated. You should definitely upgrade that to 5.5

That aside, you're sending the form via POST and checking $_GET. $_POST['blah'] should give you the expected result.
donny
Forum Contributor
Posts: 179
Joined: Mon Aug 11, 2014 11:18 am

Re: Form POST not working

Post by donny »

that was a error i made when posting this thread. i have $_POST on my process page

ill upgrade to 5.5 now
donny
Forum Contributor
Posts: 179
Joined: Mon Aug 11, 2014 11:18 am

Re: Form POST not working

Post by donny »

fixed it.. thanks a lot
Post Reply