EasyDine is a web-based restaurant reservation system that allows users to sign up, log in, view menus, and reserve tables at their favorite restaurants. The project is built using PHP, MySQL, HTML, CSS, and JavaScript, and leverages the Restoran Bootstrap Restaurant Template by HTML Codex.
- User authentication (sign up, log in, log out)
- Restaurant menu display
- Table reservation system
- Responsive design using Bootstrap
- Animated UI elements and carousels
index.php: Home page/dashboardlogin.php,signup.php,logout.php: User authenticationmenu.php: Restaurant menureserve.php,final.php: Table reservationabout.php,service.php: Informational pagesconnection.php: Database connectionfunctions.php: Common PHP functions (e.g., authentication)config.php: URL helper functions used to build dynamic pathscss/,js/,img/,lib/: Static assets and libraries
-
Clone the repository:
git clone https://github.com/sampriti-gopisetti/Restaurant-Reservation-System.git -
Configure the database:
- Create a MySQL database named
login_sample_db(or updateconnection.phpwith your DB details). - Create a
userstable with columns:user_id(varchar),username(varchar),password(varchar).
- Create a MySQL database named
-
Set up a local server:
- Place the project folder in your web server's root directory (e.g.,
htdocsfor XAMPP). - Start Apache and MySQL services.
- Access the app at
http://localhost/EasyDine/.
- Place the project folder in your web server's root directory (e.g.,
-
Optional: If hosting behind a reverse proxy (e.g., on Render, Nginx, Cloudflare), ensure the proxy forwards standard headers (
X-Forwarded-Proto,X-Forwarded-Host,X-Forwarded-Port) so URL generation detects the correct scheme and host.
To avoid hardcoded paths and make the app portable across environments and subdirectories, all pages use helpers from config.php:
- base_url(path = ''): Returns the absolute base URL for the app with an optional path appended.
- asset(path): Returns a URL for static assets inside
css/,js/,img/,lib/. - url(path): Returns a URL for internal page links (e.g.,
login.php,menu.php).
Examples inside PHP:
<link href="<?php echo asset('css/style.css'); ?>" rel="stylesheet"><img src="<?php echo asset('img/hero.png'); ?>" alt=""><a href="<?php echo url('menu.php'); ?>">Reserve A Table</a>
Notes:
- The helpers account for HTTPS and common proxy headers.
- Use these helpers for all assets (
href/src) and internal links to prevent broken paths when deploying under a subfolder.
- PHP >= 7.x
- MySQL
- Bootstrap 5 (included)
- jQuery, FontAwesome, and other JS/CSS libraries (included in
lib/)
- Template: Restoran - Bootstrap Restaurant Template by HTML Codex
- See
LICENSE.txtfor template license details.
See LICENSE.txt for details.