NYCPHP Meetup

NYPHP.org

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

Rolan Yang rolan at omnistep.com
Thu Jun 14 21:56:49 EDT 2007


Michael Southwell wrote:
>
> 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']}" 
> );
>
>

This should suffice

header( "Location: 
http://example.com/membership.php?action=pay_internet&join=$joinFlag&".SID 
);



More information about the talk mailing list