Current setup is as follows:
The URL is:
PHP Code:
http://localhost/testing/test123-page2/?sortOptions=priceLowToHigh
The rewrite rule is:
Code:
- Code: Select all
RewriteRule ^([A-Za-z0-9]*)-page([0-9]*)/?$ formtest.php?prodType=$1&page=$2&show=$4&sort=$6 [L]
The Sortoptions value is posted in the URL but I'm unable to get the value.
Is this because the mod rewrite is preventing the value from being used?
If so how do perform a mod rewrite and submit variables through POST at the same time?
Page code as follows using an onchange on the select form:
PHP Code:
- Code: Select all
<html>
<body>
<?php
$myfield1 = $_GET['sortOptions'];
$myfield2 = $_POST['sortOptions'];
echo "GET Myfield == " . $myfield1 . "<br />";
echo "POST Myfield == " . $myfield2 . "<br />";
//document.sortForm.submit();">
?>
<FORM
NAME="sortForm"
METHOD="GET">
<SELECT NAME="sortOptions" onchange="javascript: this.form.submit();">
<OPTION VALUE="priceHighToLow">Price High to Low</option>
<OPTION VALUE="priceLowToHigh">Price Low to High</option>
</SELECT>
</FORM>
</body>
</html>