Redirect page url encode you message as a get var
redirect page
header('Refresh: 3;URL=http://www.mysite.com/nextPage.php?message=you%20have%20done%something%20Right');
nextPage.php
<?
$message=$_REQUEST=['message'];
echo"$message";
?>
or
if you want to keep your urls clean
header('Refresh: 3;URL=http://www.mysite.com/nextPage.php?id=1');
//change the 1 based on a success or fail can be done by an extra variable
if(success == "1")
{
$id = "1";
}
else
{
$id = "0";
}
header("Refresh: 3;URL=http://www.mysite.com/nextPage.php?id=$id");
nextpage.php
you can now set your errors here
[code=php]
<?
$id=$_REQUEST=['id'];
if (id =="1"
{
$message ="success you did something right";
}
elseif
{
$message ="opps you did something wrong";
}
else
{
$message ="other tesxt here";
}
echo"$message";
?>