prepare("SELECT id FROM restaurants WHERE user_id = ?"); $stmt->execute([$_SESSION['user_id']]); $restaurant = $stmt->fetch(); if (!$restaurant) { // If for some reason the user is a restaurant owner but has no restaurant, redirect them header('Location: ../index.php'); exit; } $restaurant_id = $restaurant['id']; // Get restaurant details $stmt = $pdo->prepare("SELECT name FROM restaurants WHERE id = ?"); $stmt->execute([$restaurant_id]); $restaurant_details = $stmt->fetch(); // Get menu items for the restaurant $stmt = $pdo->prepare("SELECT * FROM menu_items WHERE restaurant_id = ? ORDER BY name"); $stmt->execute([$restaurant_id]); $menu_items = $stmt->fetchAll(); ?>

Manage Menu for

Add New Menu Item

Name Description Price Actions
No menu items found.
$ Edit Delete
Back to Dashboard