I have a mysql query:
$ziua = "SELECT DISTINCT DAYOFMONTH(ziua) FROM rapoarte";
$ziuaResult = mysql_query($ziua);
With the results i get, i want to add them in a drop down box, like this:
`
echo"Selectati Ziua:
<td><select name='ziua'>
<option value='---'>---</option>";
while($ziuaRow = mysql_fetch_array($ziuaResult)) {
$ziua1 = $ziuaRow['ziua'];
echo "<option value='$ziua1'>$ziua1</option>";
}
echo"";
`
the problem is that my drop-down boxes are empty. there are 2, 3 options (depending on the select result), but no text is shown.
I have the same problem with this selection:
SELECT DISTINCT HOUR(ora) FROM rapoarte
How can i fix this?
thanks,
Sebastian
EDIT
sorry,
i added the wrong code.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…