|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Session cache problems in PHP
I have a problem using Sessions currently in PHP (I am using IE6).
I have 2 pages - a form into which the user submits his data and a registration form which checks the data for any errors. My problem is that, if there is an error and I go back one page (using either the Back button or javascript:history.go(-1); ), change a value then resubmit, the old value still persists and is the one actually added to the database. At the moment I am using the following headers on BOTH the form page and the registration page: session_start(); session_cache_limiter('nocache'); header("Cache-control: no-cache, must revalidate"); // IE 6 Fix. header("Pragma: no-cache"); Can anyone help? I've read there are problems with caching in IE6, but thought this would cure them. |
|
#2
|
||||
|
||||
|
Here's the headers i found once when you don't want a page to cache:
PHP Code:
perhaps that will help you along a bit? |
|
#3
|
|||
|
|||
|
Yeah I saw that code as well, but tried it and no luck. When I submitted and went to the register page, then clicked back, modified one of the text fields and submitted again, it still went with the old field value.
|
|
#4
|
|||
|
|||
|
try to declare the session_cache_limiter before declaring session_start()
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Session cache problems in PHP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|