Redirect Issue with back button
PHP Code:
<?php
if(isset($_POST['submit']))
{
header("Refresh: 5; url=test.php");
$success=1;
}
?>
<?php
if($success==1)
echo "success";
else
{
?>
<form method="post" action="">
<input type="submit" name="submit" value="Submit">
</form>
<?php
}
?>
I'm trying to post a success message on the same php page. When I press the back button on test.php it returns to the page with the success message again. How can I get back to the form when I press the back button instead and only display the success on submission of the form?