I am trying to get mysql results to show up in a list form field. Here is my code:
echo ("Select Date:<BR>");
?>
<select name="article_date">
<?php
$query = mysql_query ("SELECT date_FORMAT(date,'%m/%d/%Y') AS date FROM news WHERE author=$userid");
if (mysql_num_rows($display_title) > 0) // If given ID exists...
{
while ($row = mysql_fetch_array($query))
{
$date = $row["date"];
echo $date;
}
}
}
?>
<option><?php echo $date; ?><option>
</select>
Where could I have gone wrong?