query($sql); // check if there are any rows returned if ($result->num_rows > 0) { // output data of each row echo ""; while($row = $result->fetch_assoc()) { echo ""; } echo "
Course ID | Course Name | Instructor | Start Date | End Date |
---|---|---|---|---|
".$row["course_id"]." | ".$row["course_name"]." | ".$row["course_instructor"]." | ".$row["start_date"]." | ".$row["end_date"]." |