Can someone please help me with the following code?
The function works etc but the part that is causing the errors is the selected bit.
The selected part is based on the url ie if the url is index.php?make=Apolo then Apolo option should be shown as the selected option in the echoed select menu.
What the script seems to be doing is it gets to the option that should be shown as selected, sets it as selected but also sets all the options thereafter it in the list to selected aswell!!
Any ideas whats wrong with the code and how to fix it please would be really helpful.
function getTierOne()
{
$result = mysql_query(“SELECT DISTINCT Make FROM Stock WHERE Type=‘2’ ORDER BY Make ASC”)
or die(mysql_error());
while($tier = mysql_fetch_array( $result ))
{
if($tier['Make'] == $_REQUEST['make']) { $mine = 'selected';}
echo '<option value="'.$tier['Make'].'" selected="'.$mine.'">'.$tier['Make'].'</option>';
}
}