Posted by & filed under PHP Development.

Having issues with $_SESSION[‘var’]’s not being saved after you redirect the user via header()? Add exit(); after the header() call.

Example:

$_SESSION['emailed'] = true;
header('Location: response.php');
exit();

Cheers!

Share on FacebookTweet about this on TwitterPin on PinterestDigg thisEmail this to someonePrint this page

One Response to “Session-vars with header() transfer”

Leave a Reply

Your email address will not be published. Required fields are marked *