Here I’m using combo box for searching working fine fetch from MySQL.
here is the code
<select name="location" class="styled">
<option selected="selected" value=''>Any</option>
<?php
while ($loc_row = mysql_fetch_array($loc_result))
{
echo "<option value='$loc_row[job_location]'";
if($loc_row['job_location'] == $location)
{
echo 'selected="selected"';
}
echo ">$loc_row[job_location] </option>";
}
?>
</select>
when click on search get string becoming as selected $location=isset($_GET['location'])?$_GET['location']:''; during this time there are two selected value.
could any one can help me to be one select value please
Remove the
selected="selected"from the default “Any” option. The first element is selected by default.