I have created the following <select> thing with the php pulling the data out from the db perfectly.....trouble is I only want to see one of each of the entries!
<SELECT name="tour">
<?php
$db = "gallery";
$link = mysql_connect( "path", "user" );
if ( !$link ) die( "Couldn't connect to MySQL".mysql_error() );
mysql_select_db( $db, $link ) or die( "Couldn't open $db: ".mysql_error() );
$query = "SELECT tour FROM galleryTable ORDER BY tour";
$result = mysql_query( $query, $link ) or die( "Couldn't execute query".mysql_error() );
while ($row = mysql_fetch_array( $result )) {
$tour = $row["tour"];
print "<OPTION value=\"$tour\" size=\"20\">$tour</OPTION>";
}
mysql_close( $link );
?>
</SELECT>
All help much appreciated!
Thanks in advance!