sean14592 Posted June 2, 2008 Share Posted June 2, 2008 I have a made a form that adds properties to our site, on submit php checks if any errors have occured they can click a button to go back. heres my code: addprop form http://pastebin.com/m4456945d Next page which checks details http://pastebin.com/f1e4d2392 The problem is when they get a error and go back they see a 'Webpage has expired' error in IE or in Firefox they get a popup warning. Cheers Sean Link to comment https://forums.phpfreaks.com/topic/108413-weird-and-annoying-error/ Share on other sites More sharing options...
cheechm Posted June 2, 2008 Share Posted June 2, 2008 You can't click the back button after post data has been sent. You can replace <FORM><INPUT TYPE="button" VALUE="Click Here to return to the form!" onClick="history.go(-1);return true;"> </FORM>/code with [code] <a href="**WHERE EVER THE FORM IS">Go back</a> [/code] Link to comment https://forums.phpfreaks.com/topic/108413-weird-and-annoying-error/#findComment-555959 Share on other sites More sharing options...
sean14592 Posted June 3, 2008 Author Share Posted June 3, 2008 ok, done, that works now but instead im getting a error saying: "Invite ID Field Empty!" once I click the go back link. so somewhere down the line its forgetting the post data from the first form, I have tride making it all sessions but yet i still get error. weird! Sean Link to comment https://forums.phpfreaks.com/topic/108413-weird-and-annoying-error/#findComment-556367 Share on other sites More sharing options...
DarkWater Posted June 3, 2008 Share Posted June 3, 2008 Because you can't go back with POST data. The browser forgets it, and the browser warns about it. The web is stateless, so you NEED to store the info in a session for them to use it on another page. But why exactly do you WANT them to go back? Link to comment https://forums.phpfreaks.com/topic/108413-weird-and-annoying-error/#findComment-556372 Share on other sites More sharing options...
sean14592 Posted June 3, 2008 Author Share Posted June 3, 2008 They may ned to go back if error occures, I have tried doing it with sesions, yet i still get error...here is my code.... step 1 http://pastebin.com/m6d97a25a step 2(checks step1 and shows form for step 2) http://pastebin.com/m459beaf4 Step 3(Checks step3 and show form for step 2(not yet created just copy of step 2)) http://pastebin.com/m226ef49f Thanks a bunch sean Link to comment https://forums.phpfreaks.com/topic/108413-weird-and-annoying-error/#findComment-556381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.