[nycphp-talk] lost sessions on redirect
Daniel Convissor
danielc at analysisandsolutions.com
Mon Feb 9 20:16:24 EST 2009
Hi Chris:
On Mon, Feb 09, 2009 at 07:32:46PM -0500, Christina Karlhoff wrote:
> 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.
You are talking about two potential situations.
1) The session isn't being maintained between pages.
2) The posted data isn't passed along on the redirect.
The first issue can be due to one or more scripts missing the
session_start() call at the top. Or there is other output before the
session_start() call so the session cookie isn't being set properly (you
may be not seeing the error message because you have display_errors off,
so look at your error_log.
The second issue is expected. The HTTP POST goes to the initial page.
When you're redirecting to another page, that's a whole new GET request
unrelated to the initial POST request.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list