SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old January 21st, 2004, 06:45 AM
Kibashira Kibashira is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 Kibashira User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old January 21st, 2004, 09:20 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
Here's the headers i found once when you don't want a page to cache:

PHP Code:
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0"false);
header("Pragma: no-cache");                          // HTTP/1.0 


perhaps that will help you along a bit?

Reply With Quote
  #3  
Old January 21st, 2004, 11:20 AM
Kibashira Kibashira is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 2 Kibashira User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old March 8th, 2004, 08:38 PM
yusogga yusogga is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 yusogga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try to declare the session_cache_limiter before declaring session_start()


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Session cache problems in PHP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway