interactivepoint solutions

Session-vars with header() transfer

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!

1 Comment to Session-vars with header() transfer

  1. Brett's Gravatar Brett
    October 30, 2009 at 5:08 pm | Permalink

    Thanks for this. It helped with a major problem I was having!

Leave a Reply

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>