Re: [PHP] $_POST- Vars - Back-Button
On Wed, August 1, 2007 6:18 am, Christian Hänsel wrote: this might be a noob- question, but I simply do not care anymore. After a few hours of fiddling with this @/**%$ (screaming AAa), I would like to ask you. So what I have is this: I have a search engine for a car market, which has about 30 $_POST- vars. Now when the user clicks on a result link, it takes him to the car details page. Now when he hits the back button, he either gets the Page has expired (IE) or the Wanna send the form data again message box (FF). Now I would like to have kind of a back-button, so the user will see the reusult list again without having to deal with this. I guess what I'm asking for is a one-click re-submission of POST data... Do you have a clue on how to do this? The EASIEST solution would be to change your POST to GET, assuming you are NOT changing any data with the search. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] $_POST- Vars - Back-Button
Hi guys, this might be a noob- question, but I simply do not care anymore. After a few hours of fiddling with this @/**%$ (screaming AAa), I would like to ask you. So what I have is this: I have a search engine for a car market, which has about 30 $_POST- vars. Now when the user clicks on a result link, it takes him to the car details page. Now when he hits the back button, he either gets the Page has expired (IE) or the Wanna send the form data again message box (FF). Now I would like to have kind of a back-button, so the user will see the reusult list again without having to deal with this. I guess what I'm asking for is a one-click re-submission of POST data... Do you have a clue on how to do this? Cheers for any answers! Chris -- - My baby's first words will be Hello World -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_POST- Vars - Back-Button
Hey Chris, 1) Use sessions (read up on it if you don't know it; in short: session_start() at the very beginning of your script creates a $_SESSION array that is persistent through subsequent page calls) 2) Submit the form to the search page and preprocess it by putting the post vars into the session, then use header() to relocate to the actual processor 3) Have the actual processor work, i.e. the result list page script, with the session data. Do not destroy the session data afterwards. Now if a user uses the back-button from your result list, he will again reach the search page, without the 'wanna send form again' message box. I very strongly advise you not to break the browsers back button functionality. It's there for a reason and people rely on it to behave accordingly. Don't duplicate functionality that the browser already has. HTH, Stijn Christian Hänsel schreef: Hi guys, this might be a noob- question, but I simply do not care anymore. After a few hours of fiddling with this @/**%$ (screaming AAa), I would like to ask you. So what I have is this: I have a search engine for a car market, which has about 30 $_POST- vars. Now when the user clicks on a result link, it takes him to the car details page. Now when he hits the back button, he either gets the Page has expired (IE) or the Wanna send the form data again message box (FF). Now I would like to have kind of a back-button, so the user will see the reusult list again without having to deal with this. I guess what I'm asking for is a one-click re-submission of POST data... Do you have a clue on how to do this? Cheers for any answers! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_POST- Vars - Back-Button
this might be a noob- question, but I simply do not care anymore. After a few hours of fiddling with this @/**%$ (screaming AAa), I would like to ask you. So what I have is this: I have a search engine for a car market, which has about 30 $_POST- vars. Now when the user clicks on a result link, it takes him to the car details page. Now when he hits the back button, he either gets the Page has expired (IE) or the Wanna send the form data again message box (FF). Now I would like to have kind of a back-button, so the user will see the reusult list again without having to deal with this. I guess what I'm asking for is a one-click re-submission of POST data... Do you have a clue on how to do this? The resubmit page is being displayed because the results page is the result of a form POST. You can do one of two things: 1. Change your search form to a GET request. 2. Stuff the existing POST data into the session and have your results page use that before looking to the POST data. -- Richard Heyes +44 (0)844 801 1072 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php