note 29798 added to function.session-start
| From: | ming at rack1 dot php dot net | Date: | Tue, 25 Feb 2003 14:32:53 +0000 |
| Subject: | note 29798 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-44502@lists.php.net to get a copy of this message | ||
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.
--
http://www.php.net/manual/en/function.session-start.php
http://master.php.net/manage/user-notes.php?action=edit+29798
http://master.php.net/manage/user-notes.php?action=delete+29798
http://master.php.net/manage/user-notes.php?action=reject+29798