note 29798 deleted from function.session-start by bjori
| From: | bjori@php.net | Date: | Sun, 16 Apr 2006 00:16:15 +0000 |
| Subject: | note 29798 deleted from function.session-start by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108202@lists.php.net to get a copy of this message | ||
Note Submitter: ming
----
if you are dealing with forms and session_start() you might experience that all form-values will
automatically be emptied after returning to the form with the browser's back-button or
javascript's history.back().
this is especially annoying if you want to enable your users to use the browser's back button
to apply corrections to the inputted data on the previous page.
add this line right after calling session_start() to solve the problem:
header("Cache-control: private");
now, users can hit the back-button to access the form containing all the information they've
inputted before.