Do something like
header("Location: index.php?Message=" . urlencode($Message));
Then on index.php ...
if (isset($_GET['Message'])) {
print $_GET['Message'];
}
In other words, it index.phpalways checks to see if a message has been sent to it in the URL. If it is, display it. Then just pass the message to redirect
if you really want to use a modal popup, generate js ...
if (isset($_GET['Message'])) {
print '<script type="text/javascript">alert("' . $_GET['Message'] . '");</script>';
}
, , ,