Hi,
I've been playing around with PHP after a bit of an break. I am using PHP version 5.2, with Apache server version 2.2.
Everything seemed fine, but when playing around with using POST and GET to fill variables in a php script GET works fine, but POST does not. This seems odd... any suggestions?
And...
Does not work. However...
This...
And this
Does work. I can't see why...
Any suggestions? I suspect it is something obvious!
I've been playing around with PHP after a bit of an break. I am using PHP version 5.2, with Apache server version 2.2.
Everything seemed fine, but when playing around with using POST and GET to fill variables in a php script GET works fine, but POST does not. This seems odd... any suggestions?
Code:
<html>
<form action="post.php" method="post">
Test: <input type="text" name="test"><br>
<input type="Submit">
</form>
</html>
Code:
<?php
$input=$_POST['test'];
echo $query;
?>
This...
Code:
<html>
<form action="get.php" method="get">
Test: <input type="text" name="test"><br>
<input type="Submit">
</form>
</html>
Code:
<?php
$input=$_POST['test'];
echo $query;
?>
Any suggestions? I suspect it is something obvious!