NYCPHP Meetup

NYPHP.org

[nycphp-talk] problem SOLVED: session variables disappear after redirection

Michael Southwell michael.southwell at nyphp.com
Thu Jun 14 21:44:30 EDT 2007


At 09:14 PM 6/14/2007, you wrote:
>I'd still be interested in seeing where you set the Location header,
>because it's possible you're not addressing the root cause of the problem.

Here it is; comments/criticism/suggestions welcome:

// get it at the very beginning just so I have it, regardless of cookies
list( $label, $id ) = explode( '=', SID );
$_SESSION['id'] = $id;
.......
// test input
.......
// passed all tests, redirect to thanks, pay now (non-working one 
ended after $joinFlag)
header( "Location: 
http://example.com/membership.php?action=pay_internet&join=$joinFlag&PHPSESSID={$_SESSION['id']}" 
);


Michael Southwell, Vice President for Education
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses





More information about the talk mailing list