Menu
A website redirects a user to a page (“myPage”, whose code is below) and sends the user’s form data via POST upon redirection. I understand that when the user refreshes “myPage”, the POST data is just resent, so “Success!” will always be echoed upon refresh. Is there a way that counteract this so that I can make my page run the failure portion of my code upon refresh?
[B]myPage:
[code=php]<?php
if(isset($_POST[‘key1’])
{
echo “Success!”;
}
else
{
echo “Failure…”;
}
?>