I am selecting values from a row, and inserting it into a table.
Receiving the error: mysql_fetch_array() expects parameter 1 to be resource, boolean given on line 42.
35 <?php
36 // Viewing input values from its respected row
37 $query = "SELECT * FROM servers";
38 $result = mysql_query($query);
39
40 echo "<table";
41
42 while($row = mysql_fetch_array($result)){
43 echo "<tr><td>" . $row['serverip'] . "</td><td>" ;
44
45 echo "</table>";
46
47 mysqli_close();
48
49 }
50 ?>
I am told that this error is caused because $result is not a resource.. however I have configured $result in line 38. Any ideas as to whats causing the error?