hi i have done a header redirect to stop from the resending data in most browser but seem to have a problem with showing messages after that's done. After the user finishes doing something he or she gets redirected and there[s a message in a session either error or success. When the user gets redirected once the message is suppose to show and than after it shows it unsets but the problem im facing is that it apparently unsets before showing the message. Heres some of the code
<?php
$_SESSION['message'] = "Your post has been successful";
header("Location: login.php");
echo $message;
unset ($_SESSION['message']);
?>