Hello,
I have a list of attendance sheets in a database, each with a date.
I want to display a drop down list with the dates listed, but the only way I know how to do it will show every date from in the database. How can I make it only show the date once?
Here is how I know to do it:
echo "<select name=datelist id=datelist>";
echo "<option value='' select>";
$listget=mysql_query("SELECT Date FROM 15517Attendance");
while($row=mysql_fetch_array($listget)){
$date = $row['Date'];
echo "<option value='$date'>$date";
}
echo "</select>";
So if I have two rows with the date of 2006-03-29 then it will show that date twice in the list. Is there a way to only show it once?
Thanks for any help