Assuming you have access to an external php file that processes the file, you can do something similar to the following in the processing file:
$_SESSION['flashMessage'] = 'Thank you for posting.';
header("Location: your-page.php');
Then add the following to the redirect page:
if ($_SESSION['flashMessage']) {
echo $_SESSION['flashMessage'];
$_SESSION['flashMessage'] = NULL;
}
source
share