Hi
I have a code that populates a drop down box with data from a mysql table. What i want to do is not to list the same piece of data twice. Here is my example
Im selected city from the tableinclude
include ("customer_table.inc");
$connection = @mysql_connect("", "", "") or die("Couldn't connect.");
$db = @mysql_select_db($db_name, $connection)or die("Couldn't select database.");
$sql = "Select city from $table_name ";
$result = @($sql,$connection)or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result)){
$city = $row['city'];
$option_block3 .= "<option value = \"$city\">$city</option>";
So, if there are two or more occurences of the same city, i only want one to appear in the drop down option box.
Thanks for any help
}