NYCPHP Meetup

NYPHP.org

[nycphp-talk] lost sessions on redirect

Michael Southwell michael.southwell at nyphp.com
Mon Feb 9 20:02:05 EST 2009


Christina Karlhoff wrote:
> About a year ago NYPHP created a captcha form for our website.  The html 
> has undergone quite a few changes.  Unfortunately in that process we've 
> lost some function...when a user submits the form, forgetting a required 
> field, the session is lost; on the redirect the data that was input by 
> the user is gone.  Needing some guidance as to how to fix this.  Help 
> please?

Carry the session id along as a get variable in the redirect, something 
like this:
header( 'Location: somewhere.php?PHPSESSID=' . session_id() );


-- 
=================
Michael Southwell
Vice President, Education
NYPHP TRAINING:  http://nyphp.com/Training/Indepth



More information about the talk mailing list