Click to See Complete Forum and Search --> : Go Back in PHP?


dhassen
12-17-2003, 01:46 PM
Hi, I have a function that puts all the Post info from a rather large form into an array. I also have a empty array/cart type function. My problem is this, when one hits the back button all the info is there and they can edit it, but when the empty routine is run it returns to the form via the header (Location: ) method and all info is lost. Is there any way to go back one page in history in PHP like you can in javascript?

pyro
12-17-2003, 04:50 PM
No, because PHP runs server-side, and does not have control over the users browser.

AdamGundry
12-20-2003, 06:03 AM
You could serve a page which contains the Javascript code "history.back()", which should preserve the values. You would also need to provide a link for those with JS disabled.

Adam