Write text with echo() after reloading page with header() in php

 if (true) 
{
Do_Some_MySQL();
$_SESSION['message'] = 'Succesfully Saved';
header("Location: yourpage.php");
}
else
{
echo "Error!";
}


Then , Add echo statement to print the success message             
<?php echo $_SESSION['message'] ?>

Post a Comment

0 Comments