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 #169402 is a reply to message #169384] Thu, 09 September 2010 14:41 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(GarryJones)

> If a user has missed something when they preview a form I want to
> return them with the back button or the cancel button to the previous
> page. Msie gives me the page expired error and firefox gives me a
> button to reload. But then of course all the entered information is
> gone...
>
> Pages are
> page1 (the form)
> page 2 (preview page)
> page 3 (confirmation page)

The usual way is to do 1) and 2) on the same page, i.e. submit the form
to itself. This makes it very easy to validate the input and simply show
the form again if something's wrong and missing, together with some
error message. Then the user can directly fix the mistakes and submit
again. If all is fine, the form script processes the data and shows the
confirmation page or redirects to one.

> I googled around and found this
>
> session_cache_limiter(private_no_expire);
>
> With that at the top of each page it works but then I realised that it
> might be a good thing to restict the length of time they can do this.
>
> I googled on found something else so now I have put 3 lines of code at
> the start of each page.
>
> session_cache_limiter('public');
> session_cache_expire (1);
> session_start();

This has _nothing_ to do with your form problem.

Micha
[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:24:38 GMT 2024

Total time taken to generate the page: 0.05056 seconds