I am designing a vehicle database and need the user to be able to select from a list of makes to view the database.
The code I have below works fine but it repeats all the makes of vehicles in the database.
i.e It repeats FORD for every time there is a FORD in the MAKE of the database.
How do I stop it repeating the same make ?
Here is the code I have at the moment.
$sql = "SELECT * from stock";
$rsSelect = mysql_query($sql);
echo("<select name='Make'>");
echo("<option selected value=''>Make </option>");
while($row = mysql_fetch_array($rsSelect))
{
echo("<option value='$PHP_SELF?search=".$row["Make"]."'> ".$row["Make"]. "</option>");
}
echo("</select>");
Thanks for your help