I\'m setting a PHP session variable with a success message for a HTML form that I\'m submitting. If there are no form errors, I redirect to the same page (using header()) and di
Destroy the session:
Change your code to look something like this
if(isset($_SESSION['sentData'])
{
echo "Your message";
//This
session_destroy();
//or this
unset($_SESSION['sentData']);
}
EDIT:
Actually no, put this at the end of form.php/your template file/after you have displayed the message:
unset($_SESSION['status']);