Session-vars with header() transfer

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! FacebookTwitterPinterestDiggemailPrint