Skip to content
Intermediate

R & B Restaurant — PHP Food Ordering Website

A restaurant website where guests browse veg and non-veg dishes, open a dish page, and reach delivery, catering, and feedback. Customers can register and log in. An admin panel manages food, categories, and admin accounts. The database and sample menu come with the source zip.

38 views

PHPMySQL / MariaDBHTMLCSSBootstrap 4JavaScript

What this project is

R & B Restaurant is a classic PHP restaurant site. Visitors can use the public home page without an account. The page has a hero, popular items, a menu of dish cards, veg and non-veg categories, services, about, blog, and contact.

Each menu card shows a photo, the dish name, and the price. Tapping the photo opens that dish. Categories link to veg and non-veg lists. Services link to home delivery, table reservation, and feedback.

Customers register and log in. After login, the same style of home page is home.php. Password recovery and reset pages are included. New registrations are stored as inactive until status is set to active in the registration table.

The admin area covers admin login, the dashboard, food items, categories, and admin users. Connection settings live in dbcon.php. Sample tables and rows are in foodrestaurant.sql (admin, registration, category, food_item, product, cart, orders, order_food).

How to run it

  1. Install XAMPP, copy the FoodRestaurant folder into htdocs,
  2. start Apache and MySQL, create a database named foodrestaurant, 
  3.  import foodrestaurant.sql.
  4. Then open http://localhost/FoodRestaurant/food.php.

 

Setup steps

  1. 1
    step-01 Install XAMPP (Apache, MariaDB or MySQL, and PHP).
  2. 2
    step-02 Unzip the source so the folder is htdocs/FoodRestaurant.
  3. 3
    step-03 Start Apache and MySQL in the XAMPP Control Panel.
  4. 4
    step-04 Open http://localhost/phpmyadmin.
  5. 5
    step-05 Create a database named foodrestaurant.
  6. 6
    step-06 Select that database, choose Import, and import foodrestaurant.sql.
  7. 7
    step-07 If your MySQL user is not root with an empty password, edit host, user, password, and database name in dbcon.php.
  8. 8
    step-08 Open the public site at http://localhost/FoodRestaurant/food.php.
  9. 9
    step-09 Customer login is http://localhost/FoodRestaurant/login.php. Admin login is http://localhost/FoodRestaurant/admin/admin_login.php.
  10. 10
    step-10 There is no separate build step. PHP runs directly from the folder. vendor/ is already included for Google sign-in.