I am able to retrieve and display one row of data from a database however I would like to retrieve more than one. Code I have is messed up but I think I am going in the right area just need to make this work.
My Code:
$query = "SELECT * FROM hotel";
$results = $conn->query($query);
while($hotel = $results->fetch()) { echo "<br> id: ". $hotel['hotel_id']. " - Name: ". $hotel['name']. " - Address: " . $hotel['address'] . " - Postcode: " .
$hotel['postcode']. " - Town: " . $hotel['town']. " - Description: ". $hotel['description']. " - rating: ". $hotel['rating']. " - image: " . <img src='". $hotel['image']. "'>"";
}
$conn=NULL;
?>