Skip to content

This is a full-stack Hotel Booking Website built with PHP and MySQL for the backend and HTML, CSS, Bootstrap, and JavaScript for the frontend. It includes user-end functionalities for booking hotel rooms and admin-end features for managing bookings, users, and rooms.

Notifications You must be signed in to change notification settings

ShubhamChoudharyShubh/Hotel-Booking-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Hotel Booking Website

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.

Features

User End:

  • 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).

Admin End:

  • 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.

Tech Stack

  • 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.

Setup and Installation

Requirements:

  • PHP 7.x or later
  • MySQL Database
  • A web server (Apache, Nginx, etc.)
  • Composer (Optional for managing dependencies)

Steps to Run:

  1. Clone the Repository:

    git clone https://github.com/yourusername/hotel-booking-website.git
  2. Database Setup:

    • Create a MySQL database and import the hotel_booking.sql file located in the database/ 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');
  3. 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');
  4. 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.

Admin Panel Credentials:

  • Username: admin
  • Password: password (Change this from the database after first login).

Project Structure

├── 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

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This is a full-stack Hotel Booking Website built with PHP and MySQL for the backend and HTML, CSS, Bootstrap, and JavaScript for the frontend. It includes user-end functionalities for booking hotel rooms and admin-end features for managing bookings, users, and rooms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published