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 #169407 is a reply to message #169384] Fri, 10 September 2010 07:45 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 9/9/2010 5:24 AM, GarryJones wrote:
> 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)
>
> 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();
>
> But the user can still go back and forth even after the one minute
> deadline.
>
> As usual I need help with the syntax, how to I flash up the page
> expired error if a user clicks back say in 15-20 minutes?
>
> Any help, greatly appreciated...
>
>
> Garry Jones
> Sweden

You might first want to read this before starting to approach this all
the wrong way:
http://en.wikipedia.org/wiki/Post/Redirect/Get

No need to mess around with session settings if you set up your logic
the right way. ;-)

Regards,
Erwin Moller


--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
[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:29:06 GMT 2024

Total time taken to generate the page: 0.07070 seconds