i'm trying to populate a select list from a mysql database. my line numbers on the code are 90 to 104. the error i'm getting is
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\capstone\admin\admin_curriculum.php on line 99
my code is:
$con = mysqli_connect("localhost","root","");
$sql = "SELECT * FROM PROGRAM";
$result = mysqli_query($con, $sql);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else {
mysqli_select_db($con, "IT_SOL_CTR");
while($row = mysql_fetch_assoc($result))
{
echo "<option value=\"{$row['PROGRAM_ID']}\">
{$row['PROGRAM_ID']}</option>";
}
}