Im Using the following code to validate (poorly, I know) a form’s $_POST[]ed data. How can I pass $auth onto the new page so I can print it for the user? (short of using my-account.php?auth=You Must......)
if (!$_POST['supportarea'] || !$_POST['supportbody']) {
$auth = 'You must provide some information if we are ever to help you with your support ticket';
header('Location: ../pages/my-account.php');
}
Thanks. Alex.
You should use the session. In your script:
In the my-account.php script:
Then, if
!empty($flash_message), show it to the user.