my script returns this error:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\wamp\www\php_test\user_inter.php on line 17
<?php
$db = mysql_connect("localhost");
mysql_select_db("room_p7", $db);
$query = "select * from members";
$result = mysql_query($query);
while($record=mysql_fetch_assoc($result)){
while(list($fieldname, $fieldvalue) = each($record)){
echo $fieldname.": <br>".$fieldvalue.":<br><br>";
}
echo "<br><br>";
}
?>