Forum Moderators: coopster
You know the deal, in IE it is really ugly, it just says "Page Expired". And its not that much better in FF cause it alerts that you are reposting vars etc etc.
I have got round it a couple of ways.
1. use modrewrite so that the necessary vars are passed using get vars
2. post the form to itself and then use header("location") to redirect somewhere else.
On this particular project i cant use mod rewrite because some of the vars are too long and a fair few of them are arrays.
I also find the second option very tedious as it means posting alot more vars around the site.
Just curious if anyone has any other ways of doing it?
Cheers
Ally
This is a necessary functionality of browsers and getting around it doesn't make much sense to me.
what functionality are you having issues with?
the only time this should be an issue is if the user hits the back button to go back to a form they have alreay submitted. In that case the browser should notify them.
The form i have needs to take alot of variables over 3 different screens, each screen has its own individual purpose and the way i am doing it at the mo is to submit to itself with a variable saying what the next step is, and using this var to decide what needs to be processed and showing relevant template. I am storing each process (page) set of results in a db.
I am not having any probs with the functionality of the site or passing of vars etc, it all works fine, I have even added a back button for the user on the site but the user can still just press the back button on the browser and this message will show up.
[edited by: Scally_Ally at 2:59 pm (utc) on May 9, 2007]
The way top do it is to have your processing script in the background and obviously save the vars to a session as you go. This way each form page never had anything posted to it.
it's actually the logic (I would say lack there of as I hate things posting to themselves for many reasons, please take no offense as none is intended) of posting to itself is what is causing the browser to be upset, the behaviour oif asking to repost is required and desired.
Looks like that is just the way it is with this project, guess i am just gonna have brush up on my client relationship skills instead..
Thanks for your thoughts on the subject jatar.
Ally
<added>so now you explain it to the client, say it just is that way, then give the big, it's going to be tough but I'll see what I can do.
Then make it happen and belabour it a bit ;)