Reputation: 107
I have a form that uses XML to get results. From those results users can click to a detail page. My problem is when a user clicks back to the results page, they are asked if they want to submit the form again. How do I create this so back button just displays the results, like on aa.com, ebay, autotrader, etc.
Thanks!
Upvotes: 0
Views: 979
Reputation: 7433
Is it just a search page that displays results? Why not use GET rather than POST in your form? Looking at search engines out there, they seem to use GET for their search interface. I can think of a few reasons to use GET rather than POST.
Unfortunately CodeIgniter, by default, nukes the query string when processing a request. You can enable the query string in CodeIgniter by following this answer.
Upvotes: 0
Reputation: 12873
You should redirect to another page to using redirect() method of codeigniter. This will prevent the browser asking a confirmation on form submission.
Upvotes: 1
Reputation: 1673
When you submit your page move the $_POST variables into the $_SESSION array and then header redirect the user to the results page.
Upvotes: 1