I keep getting this error
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in on line 21
<html> <body> <h1> Database </h1> <?php mysql_connect('localhost', 'cw2395', 'tNlkcI6k') or die(mysql_error()); mysql_select_db('cw2395') or die (mysql_error()); $reference = mysql_query("SELECT * FROM contacts"); ?> <table border = "3" cellspacing = "3" cellpadding = "3"> <tr> <th> First Name </th> <th> Last Name </th> <th> Address </th> <th> State </th> <th> Zip </th> <th> Telephone </th> <th> Email </th> </tr> <?php while($row = mysql_fetch_array($reference)) { THIS IS LINE 21 $cell1 = $row['Fname']; //Contacts first name $cell2 = $row['Lname']; //Contacts last name $cell3 = $row['Address']; //Contacts address $cell4 = $row['State']; //Contacts state of residence $cell5 = $row['Zip']; //Contacts zip code of residence $cell6 = $row['Phone']; //Contacts phone number $cell7 = $row['Email']; //Contacts email address ?>
help would be very appreciated