FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Session Cache
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Session Cache [message #169394 is a reply to message #169387] Thu, 09 September 2010 11:57 Go to previous messageGo to previous message
GarryJones is currently offline  GarryJones
Messages: 21
Registered: September 2010
Karma:
Junior Member
> How do you want to recover previous form values? Saving them into a
> session variable or leveraging the browser cache? You are mixing
> directives for both purposes.

Out of my depth as usual....

What I want...

The user fills in the form input textboxes, clicks textboxes and
submits form for preview.
The user sees he has misspelt something or forgotten to tick a box.

He clicks back on the browser. If he does this within say 5 minutes
then he will return to the form in its previous state, all text and
boxes will still be entered and status held for checkboxes. (I have
got this working). The user can also click cancel on the form instead
of ok, For that I use <input type="button" value="Cancel"
onClick="history.back()">

The way I got this working was to put
session_cache_limiter(private_no_expire); before the session_start()

If he has waited more than 5 minutes then "page has expired" will be
displayed in msie. (Resend or something in firefox). In both msie &
firefox the keyed in data is gone and he will have to start again. I
don't care about macintosh, google crome, safari or iphone. If people
use those products that can expect to have to key in the entire data
again. I don't need to overwork this little problem. Msie v7+ and
Firefox 2.6+ catches 99% of my users.

For the timeout I tried
session_cache_limiter('public');
session_cache_expire (1);
session_start();

But that didn't work.

So how do I "add" a timeout to
session_cache_limiter(private_no_expire) ?
no_expire makes me feel that a timeout can not be added. In that case
what do I put in to get what I want, ability to use back and cancel
for 5 minutes.

Garry Jones
Sweden
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Not understanding HTML form
Next Topic: PHP variables eg. $_FILES
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 20:23:07 GMT 2024

Total time taken to generate the page: 0.05231 seconds