I have an issue getting variables using PHP in a tablet site I have been working on. I have a search form on the homepage that passes variables to a list page. I then have the same search form in a 'refine search' dialog box which should pre-select the appropriate values depending on what has been passed, using PHP.
The problem is I can't seem to get the variables that have been passed (using PHP). For example I have this field in my search:
<select name="propertyType" id="propertyType">
<option value="">Any Type</option>
<option value="1"<?php if(isset($_GET['propertyType']) && $_GET['propertyType']=="1") { echo ' selected'; } ?>>Houses</option>
<option value="2"<?php if(isset($_GET['propertyType']) && $_GET['propertyType']=="2") { echo ' selected'; } ?>>Flats/Apartments</option>
<option value="3"<?php if(isset($_GET['propertyType']) && $_GET['propertyType']=="3") { echo ' selected'; } ?>>Bungalows</option>
<option value="4"<?php if(isset($_GET['propertyType']) && $_GET['propertyType']=="4") { echo ' selected'; } ?>>Other</option>
</select>
But when I pass any of these values my code does not pick them up and echo the relevant 'selected'.
The tablet site can be found here: http://muskermcintyre.co.uk/tablet Any help would be much appreciated!
Thanks.