here's my code
<?php
mysql_connect('localhost','root','');
$conn=mysql_select_db('project');
$course="snacks";
echo $q="select r_name,prep_time,cook_time,ingredient,procedure from recipe where course=$course";
$res=mysql_query($q);
while($disp=mysql_fetch_array($res))
{
echo "$disp[r_name]</br>";
echo "$disp[ingredient]</br>";
echo "$disp[procedure]</br>";
}
?>
the error is
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\web\course.php
i have tried every way to fix it but it still shows this error.