Can anyone help me to figure out the error in my code? i want to display data through two input search..my code goes like these.
<table>
<tr>
<td>Studid</td>
<td>Course</td>
</tr>
<?php
include ("connect.php");
if(isset($_POST['submit']))
{
$studno=$_POST['idsearch'];
$scourse=$_POST['coursesearch'];
$sql=mysql_query("SELECT * FROM cfnr WHERE studid= ".$studno." AND course=".$scourse."");
}
?>
<?php
while($row=mysql_fetch_array($sql))
{
}
?>
<tr>
<td><?php echo $row['studid'];?></td>
<td><?php echo $row['course'];?></td>
</tr>
</table>
i got this error in my screen.
"mysql_fetch_array() expects parameter 1 to be resource, boolean given in "
thanks! :)