$_post
Posted: Mon Jan 05, 2009 12:27 pm
I can't seem to get anything with $_post to work.
An example of the code I've been writing would be
as a html document.
And then test.php
Whenever I put this in htdocs, and run it on localhost, I can type in, and submit the form, and it takes me to the test.php page. The problem is that the page returns blank, with no text at all in.
If I set normal variables inside the php, and then echo it like this-
Then it will return with the variable value (in this case 'test'). But if I use $_post it doesn't work.
What am I doing wrong?
An example of the code I've been writing would be
Code: Select all
<form action ="test.php" method="post">
<input type="text" name="result" />
<input type="submit" />
</form>And then test.php
Code: Select all
$test = $_post ['result']
echo $testWhenever I put this in htdocs, and run it on localhost, I can type in, and submit the form, and it takes me to the test.php page. The problem is that the page returns blank, with no text at all in.
If I set normal variables inside the php, and then echo it like this-
Code: Select all
$test = "test"
echo $testWhat am I doing wrong?