I am trying to figure out how I can pass 9 form GET variables from a form to a URL segment to be processed on a result page? I have the form and results working using GET variable, but I would like a cleaner URL. How can I do this? When I pass the form to the result page now the url looks like:
http://domain.com/index.php/search/results/?mls=123456&baths=3&Search=Search
Right now, I am converting the GET variables to SESSION variables which may or may not be needed for the pagination module. I figured it could be safer. How do I adjust this to work with URL Segments, and then parse in the SQL Query? Should I even use the Session variables?
Sample Variable Retrieval on Result page
if(isset($_GET['mls'])) {
$mls = $this->EE->input->get('mls', TRUE);
$_SESSION['mls'] = $mls;
}
else {
$mls = $_SESSION['mls'];
}
if(isset($_GET['baths'])) {
$baths = $this->EE->input->get('baths', TRUE);
$_SESSION['beds'] = $baths;
}
else {
$beds = $_SESSION['beds'];
}Sample Query that I will need to use URL Segments.
{exp:query limit="10" paginate="both" sql="SELECT * FROM listings WHERE mls = '<?php echo $mls; ?>' AND baths >= '<?php echo $baths; ?>'"}Here is sample from the form
<form action="http://domain.com/index.php/search/results/" method="get" name="search_listings">
<input name="mls" type="text" class="inputbigtext" />
select name="baths" class="inputbigtext">
<option value="">Any</option>
<option value="1">At least 1</option>
<option value="2">At least 2</option>
<option value="3">At least 3</option>
<option value="4">At least 4</option>
<option value="5">At least 5</option>
</select>Thanks,
Bryan