I have three pages that has forms on them. They all lead to one another. The first page has a form that goes to page two and queries a database. I understand that a POST method should be used here (according to RFC1866 section 8.2.3) But I want to implement a GET method to this page because when a user is on page two they will select their options there and go to page three, but when a user is on page three they may need to use the browser back button to go back to page two to change some values. If POST method was used it would prompt the user to “resubmit” and I was hoping to avoid this.
?page=one ?page=two ?page=three
__________ __________ __________
| | | | | |
| | | | | |
| Page 1 | ==> | Page 2 | ==> | Page 3 |
| | | | <== | |
| | | | | |
|__________| |__________| |__________|
The problem I was facing was the problems with the URLs, when setting action to “?page=two” the input names doesn’t get picked up and put into the URL like it would if I were to set the action to “pagetwo.php” (this would turn into pagetwo.php?data=x). How can I come around this obstacle?
If I understand your problem properly then you can add a hidden input with a value of
twoand namepage. This will cause them to append to your url with the rest of your inputs.