[PHP] Re: sessions and browser back

2003-06-27 Thread chris
On Wed, 25 Jun 2003 18:56:13 +0530, Bibhas Kumar Samanta 
[EMAIL PROTECTED] wrote:

Hi,

I am trying to create restricted pages for my php/mysql/apache
server with sessions and passing session varibales to other pages for 
validation.

Eventually I am doinng session_start() at the begining and
checking whether logged in user is authorised to use this page
by a routine.
Now problem is, if filled in data in the form is incorrect, the forms 
gives an error. But when I press browser BACK button to get the
filled in form , the form seems to get reset with _no_ data.

When I try without session_start() at the begining  of form , things
seem to behave normally.
Does session_start() reset the form  and I guess browser should
have returned be by fiiled in page from cache ?
Please help

-Bibhas

This doesn't happen with every browser.  Opera never forgets the previous 
page's form contents.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: sessions and browser back

2003-06-27 Thread Chris Sherwood
there is a setting you need to make after the session start

http://ca3.php.net/manual/en/function.session-cache-expire.php

check that link out I think that it will resolve alot of problems for you..

however I have noticed forms are a little trickier... usually what I do with
those is create the back link as a hyperlink which allows me to add the info
to the form when returned so it looks like the form hasnt lost its
information.


- Original Message -
From: chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 27, 2003 11:22 AM
Subject: [PHP] Re: sessions and browser back


 On Wed, 25 Jun 2003 18:56:13 +0530, Bibhas Kumar Samanta
 [EMAIL PROTECTED] wrote:

  Hi,
 
  I am trying to create restricted pages for my php/mysql/apache
  server with sessions and passing session varibales to other pages for
  validation.
 
  Eventually I am doinng session_start() at the begining and
  checking whether logged in user is authorised to use this page
  by a routine.
 
  Now problem is, if filled in data in the form is incorrect, the forms
  gives an error. But when I press browser BACK button to get the
  filled in form , the form seems to get reset with _no_ data.
 
  When I try without session_start() at the begining  of form , things
  seem to behave normally.
 
  Does session_start() reset the form  and I guess browser should
  have returned be by fiiled in page from cache ?
 
  Please help
 
  -Bibhas
 

 This doesn't happen with every browser.  Opera never forgets the previous
 page's form contents.

 --
 Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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




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