Here’s a README.md
file for your hotel booking website project, which you can copy and paste into your GitHub repository. It provides an overview of the project, installation instructions, and basic features.
This is a full-stack Hotel Booking Website built using PHP and MySQL for the backend and HTML, CSS, Bootstrap, and JavaScript for the frontend. This project includes both user-end and admin-end functionalities, allowing users to book hotel rooms, and administrators to manage bookings, users, and rooms.
- Book Hotel Rooms: Users can browse and book rooms based on availability.
- Booking Management: Users can view, modify, or cancel their bookings.
- Login and Registration: Users can create an account or log in to manage their bookings.
- Review and Ratings: After their stay, users can leave reviews and ratings.
- Profile Management: Users can update their profile information.
- Online Payments: Integration with Paytm for online payments (or any payment gateway of your choice).
- Room Management: Admins can add, modify, or delete rooms and their details.
- Booking Management: Admins can manage booking statuses, check-in/check-out, and issue refunds.
- User Management: Admins can view, delete, or ban/unban users.
- Review Management: Admins can manage and moderate reviews and ratings.
- System Shutdown: Admins can temporarily disable the website for maintenance.
- Backend: PHP, MySQL
- Frontend: HTML, CSS, Bootstrap, JavaScript
- Libraries/Plugins: Swiper.js (for carousels), Bootstrap Icons (for UI elements)
- Database: MySQL for managing users, rooms, and bookings.
- Hosting: Designed for hosting on platforms like Hostinger, but can be deployed on any PHP/MySQL supported platform.
- PHP 7.x or later
- MySQL Database
- A web server (Apache, Nginx, etc.)
- Composer (Optional for managing dependencies)
-
Clone the Repository:
git clone https://github.com/yourusername/hotel-booking-website.git
-
Database Setup:
- Create a MySQL database and import the
hotel_booking.sql
file located in thedatabase/
directory. - Update the database configuration in
inc/db_config.php
file with your database credentials:define('DB_HOST', 'localhost'); define('DB_USER', 'your_db_username'); define('DB_PASS', 'your_db_password'); define('DB_NAME', 'your_db_name');
- Create a MySQL database and import the
-
Admin Account Setup:
- Manually insert admin credentials into the
admin_cred
table in the database. Example:INSERT INTO admin_cred (admin_name, admin_pass) VALUES ('admin', 'password');
- Manually insert admin credentials into the
-
Run the Project:
- Place the project files in your web server's root directory (e.g.,
htdocs
for XAMPP,www
for WAMP). - Open a web browser and navigate to
http://localhost/hotel-booking-website/
to view the user side. - Navigate to
http://localhost/hotel-booking-website/admin/
for the admin panel.
- Place the project files in your web server's root directory (e.g.,
- Username:
admin
- Password:
password
(Change this from the database after first login).
├── assets/ # CSS, JavaScript, and image files
├── inc/ # Includes essential files (DB Config, PHP Functions)
│ ├── db_config.php # Database configuration
│ ├── essentials.php # Core functions like `filteration`, `select`, `alert`, `redirect`
│ └── links.php # External links for CSS and JS files
├── admin/ # Admin-side pages
│ ├── dashboard.php # Admin dashboard page
│ ├── manage_rooms.php # Admin room management page
│ ├── manage_users.php # Admin user management page
│ ├── manage_bookings.php # Admin booking management page
│ └── logout.php # Admin logout page
├── user/ # User-side pages
│ ├── index.php # Home page for users
│ ├── booking.php # Room booking page
│ ├── my_account.php # User profile and booking management page
├── inc/ # Backend functions and configuration files
│ ├── db_config.php # Database connection setup
│ ├── essentials.php # Helper functions (redirection, filtering)
├── database/ # Database-related files
│ └── hotel_booking.sql # SQL script to create database tables
└── README.md # Project documentation
Feel free to fork this repository and submit pull requests if you would like to contribute to this project. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.