Error – Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in

I am receiving the following two errors:

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\SystemVehicle\delete_multiple.php on line 51

Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\xampp\htdocs\SystemVehicle\delete_multiple.php on line 75

$sql="SELECT * FROM $userlogin";
$result=mysql_query($sql);

//count table row
$count=mysql_num_rows($result);
?>
<table width="400" border="0" cellspacing="1" cellpadding="0">
<tr>
<td><form name="form1" method="post" action="">
<table width="400" border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td bgcolor="#FF0000">&nbsp;</td>

<td colspan="4" bgcolor="#FF0000"><strong>Delete multiple rows in mysql</strong> </td>
</tr>
<tr>
<td align="center" bgcolor="#FF0000">#</td>
<td align="center" bgcolor="#FF0000"><strong>name</strong></td>
<td align="center" bgcolor="#FF0000"><strong>matric</strong></td>
<td align="center" bgcolor="#FF0000"><strong>Position</strong></td>
<td align="center" bgcolor="#FF0000"><strong>Department</strong></td>
<td align="center" bgcolor="#FF0000"><strong>UserName</strong></td>
<td align="center" bgcolor="#FF0000"><strong>Password</strong></td>
<td align="center" bgcolor="#FF0000"><strong>Email</strong></td>
</tr>

<?php
while($result=mysql_fetch_array($row)){
?>

How can these be resolved?

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories