Sessions Lose Form Field Data When Back Button Used?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an old PHP page without sessions. When the user submits the form, and then clicks the browser back button, the prior form data is retained.

If I now have that PHP page require another page that uses session_start, when the user submits the form, and then clicks the browser back button, the prior form data is lost. In fact, I noticed that without the session, the web page does not reload from the server and is positioned at the bottom of the page where I left off by the "Submit" form button. With sessions, the page actually reloads from the server, so of course the form fields are empty. Is this normal behavior? Can I have the page not reload from the server? I thought I could pass the buck onto the user's browser setting, but the onus is upon my code.

I do not want to modify all my old pages to use this technique for every field http://marc.info/?l=php-general&m=118200948606904&w=2 simply because I want 1 session variable passed around.

I even modified my code to check for isset($_SESSION) to not call session_start again, but no joy.

Thanks.

_________________________________________________________________
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux