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 '' . htmlspecialchars($restaurant['name']) . ''; echo '
'; echo '
'; echo '

' . htmlspecialchars($restaurant['name']) . '

'; echo '

' . htmlspecialchars($restaurant['cuisine']) . '

'; echo '
'; echo '
'; if (!empty($restaurant['address'])) { echo '

' . htmlspecialchars($restaurant['address']) . '

'; } if (!empty($restaurant['opening_hours'])) { echo '

' . htmlspecialchars($restaurant['opening_hours']) . '

'; } echo '
'; echo '
'; echo '
'; } } catch (PDOException $e) { echo '

Error: Could not fetch restaurants from the database.

'; // Optionally log the error: error_log($e->getMessage()); } ?>