Page 1 of 1

Back button history.go()

Posted: Tue Feb 17, 2009 12:41 pm
by vikasphp
hiiii...friends..

i have a post a job page for my website.where job poster can post jobs and then if they want
to add advanced criteria then can add after submitting the current page.and go to the next page called advanced_criteria.php page . and after filling that page they go to the final submision page... ie.. postajob_final.php

i have a back button on the post a job_final .job.. i want that if any user go through two pages and click on the back button he go to the previous page . where alll the data filled by him will be displayed

i used history.go(-1) but not working in ie giving page is expired

please help ..
thanks

Re: Back button history.go()

Posted: Tue Feb 17, 2009 5:36 pm
by LanceEh
I'm rusty at this, but what I would do is - Every PHP page is rendered every time a new one is open, (so data is not saved). Me personally, I would make the back button a submit button and send any data you have on that page back to the one you are going back to (using POST). That's just what I would do.

Lance

Re: Back button history.go()

Posted: Tue Feb 17, 2009 5:39 pm
by pickle
Welcome to the forums.

This isn't general discussion. Are you looking for a client-side solution (in which case I'll move this to Client-Side), or a server-side solution (in which case I'll move this to PHP Code)?

Re: Back button history.go()

Posted: Wed Feb 18, 2009 3:48 am
by wpsd2006
$_SESSION is your answer and best friend

Re: Back button history.go()

Posted: Wed Feb 18, 2009 3:53 am
by vmmene
Store all the values filled by the user into session.

Re: Back button history.go()

Posted: Wed Feb 18, 2009 3:55 am
by mintedjo
For your reference - history.back() takes you back one page

It will still be expired though :-)