Ok so I am a rookie in php and working on populating drop down lists from a mysql database. I have a drop down list working that contains words, but my drop down list for my date refuses to work and I don't know what the difference between them should be. Working code
$querystyle="SELECT DISTINCT style FROM $table";
$styleresult=mysql_query($querystyle);
$numstyle=mysql_numrows($styleresult);
if(!$styleresult)
die(mysql_error());
$i=0;
echo "<select name=style=''><option value = 1>Game Style</option>";
while ($i < $numstyle) {
$style=mysql_result($styleresult,$i,"style");
echo "<option value = '$style'>$style</option>";
$i++;
}
echo '</select';
Non-working code
$querydate="SELECT DISTINCT release FROM $table";
$dateresult = mysql_query ($querydate);
$numdate=mysql_numrows($dateresult);
if(!$dateresult)
die(mysql_error());
$i=0;
echo "<select name=Release date=''>
<option value = 1>Release Date</option>";
while ($i < $numdate) {
$date=mysql_result($dateresult,$i,"release");
echo "<option value = '$date'>$date</option>";
$i++;
}
echo '</select';