I want to fetch data from Mysql database in list box..but it's not happening
The code is:
<?php
include("connection.php");
$sql= "select student_age from student_data";
$result= mysql_query($sql);
if(!$result)
{
die('could not connect:'.mysql_error());
}
while($row = mysql_fetch_array($result))
{
echo "anumita";
?>
<option value="<?=$row[0]?>">
<?=$row[0]?>
</option>
<?php
}
?>