query($query); //was it an okay query? you can use $result->error to look at the precise error that php gives if(!$result) { echo "
bad query - looking at all attending
"; } else { echo "
There are " . $result->num_rows . " Student-Class pairs in Attending
"; } //make an html table - for each row, print out that student id and class id //admittedly, this table really doesnt tell us much, but it lists everything //in the attending table accurately. echo ""; echo ""; while($row = $result->fetch_assoc() ){ echo ""; echo ""; echo ""; echo ""; } echo "
Student_IDClass_ID
" . $row['Student_ID'] . "" . $row['Class_ID'] . "
"; ?>