Davina Davina - 1 year ago 43
MySQL Question

Dropdownlist php doesn't show data from mysql database

Here is my code for populating data into

list from mysql database

<select name="robes">
$result = mysql_query("SELECT * FROM robes ORDER BY Classement ASC")or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$color = $row["color"];
<option value="<? echo $row['Id_robe']; ?>"><? echo $color;?></option>

now my problem that there is no data shown and no error message also.

Answer Source

Can you please check if php short tag is enabled? Or Use full php tag like

<?php instead of <?