Has anyone encountered an issue where the data you extracted from a POST and printed on screen disappears when the user presses the ENTER button on the address bar to reload the page.
This happens to me when I have a form that sends POST data from 1 page to another page which extracts the POST and prints it out. After the 2nd page prints everything well. If the user reloads the page by pressing ENTER on the address bar's [url]http://localhost.....php[/url], the page reloads but now without the data that it extracted via POST
For example, here's the form in sender.php
<form action="test.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
On another file, test.php, we receive and extract the POSTed data and print it.
Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.
Test.php prints it out ok. But then, if the user decides to press ENTER on the address bar that shows something http://localhost/.... test.php, it will reload the test.php page but this time with the parts of $POSTP["fname"] and $POST["age"] blank, which will look like an error or something wrong happened, to the user.
Is there a way to prevent this from happening? or a fix for this?