Featured Restaurants
query("SELECT name, cuisine, image_url, address, phone, opening_hours FROM restaurants ORDER BY name");
$restaurants = $stmt->fetchAll();
foreach ($restaurants as $restaurant) {
echo '
';
echo '
';
echo '
';
}
} catch (PDOException $e) {
echo '';
echo '
';
echo '';
echo '
';
echo '' . htmlspecialchars($restaurant['name']) . '
'; echo '' . htmlspecialchars($restaurant['cuisine']) . '
'; echo '';
if (!empty($restaurant['address'])) {
echo '
';
echo '' . htmlspecialchars($restaurant['address']) . '
'; } if (!empty($restaurant['opening_hours'])) { echo '' . htmlspecialchars($restaurant['opening_hours']) . '
'; } echo 'Error: Could not fetch restaurants from the database.
'; // Optionally log the error: error_log($e->getMessage()); } ?>