View Full Version : Values Dissappear After Clicking Back Button

01-04-2007, 07:30 AM
I don't know if this post should be here or in javascript cos its a bit of both but here goes.

I have a page, say main1.php which has text boxes. There is also a link which will open a window, get a data from there and store it in one of the text boxes in main1.php

after that, when i click the next button, it goes to main2.php. But when I tried to click the back button in main2.php, it goes back to the first page main1.php but all the records are gone.

I noticed something funny. If i do not use the pop up window, there will be no problem in main2.php when i click the back button. if i use it, then i have the problem.

01-04-2007, 10:40 AM
Help anyone?

01-04-2007, 06:57 PM
Not sure what the problem is exactly, but instead of worrying over whether its the js or the php, just use php sessions (http://ca3.php.net/manual/en/ref.session.php) instead, that way you can retrieve the values to repopulate the form using the php sessions.

01-04-2007, 07:06 PM