Forum Moderators: coopster
I have two drop down menu boxes and a button. The user selects from the drop down menus and pushes the button. Instead of using POST I have decided to use the GET method to carry the variables to the next page. Something like this,
ht*p://example.com/page?var1=1&var2=2
I have a rewrite rule like such,
RewriteRule ^page/([0-9]+)/([0-9]+)?$ /page.php?var1=$1&var2=$2 [L]
Is there anyway using the GET method to make the url on the next page appear like this,
ht*p://example.com/page/1/1
I haven't tried using javascript but I don't want to anyway.
Any ideas?
I was just wondering if it possible to keep clean url's when using the GET method to pass variables like the example below opening this page,
http://example.com/page/1/1
[i]instead of[/i]
http//:example.com/page?var1=1&var2=1<form action="http://example.com/page" method="get"><p>
Drop down box one
<select name="var1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option></select>
</p><p>
Drop down box two
<select name="var2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option></select>
</p></form>
As for post, I notice sometimes it will break the back button or at a minimum give the user a pop-up telling them the page is using post-data and so on. I want users to be able to navigate forward and backwards and be able to bookmark pages. I am not sure, but I don't think there is a way to achieve all this using post. If you know a way, that would be great.