Skip to content

This Hotel Room Reservation System is a simple yet effective web application designed to manage room bookings for a hotel. It demonstrates the use of frontend technologies and backend PHP for handling data storage and validation. The project is ideal for learning how to build a full-stack web application with file-based data storage.

Notifications You must be signed in to change notification settings

aboualine/php-Hotel-Reservation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Hotel Room Reservation System

A modern and user-friendly hotel room reservation system built with HTML, CSS, Bootstrap, JavaScript, and PHP. This project allows users to reserve hotel rooms, prevents double bookings, and stores reservation data in a reservations.txt file.


Features

  • User-Friendly Interface: Clean and modern design using Bootstrap.
  • Reservation Management: Users can book rooms by providing their name, email, room type, and date.
  • Prevent Double Booking: Ensures that a room cannot be booked on the same date twice.
  • File Storage: Stores all reservations in a reservations.txt file.

Technologies Used

  • Frontend:
    • HTML
    • CSS (with custom styling)
    • Bootstrap (for responsive design)
    • JavaScript (for form submission and client-side interaction)
  • Backend:
    • PHP (for handling reservations and file storage)

How to Set Up

  1. Clone the Repository:

    git clone https://github.com/your-username/hotel-reservation-system.git
    cd hotel-reservation-system
  2. Run a Local PHP Server: -Open a terminal in the project directory. -Run the following command to start a PHP server:

    php -S localhost:8000
    
  3. Access the Application: -Open your browser and go to http://localhost:8000.


How to Use

  1. Open the application in your browser.

  2. Fill out the reservation form:

    • Full Name: Enter your name.

    • Email: Provide a valid email address.

    • Room Type: Select the type of room (Single, Double, or Suite).

    • Reservation Date: Choose a date for your reservation.

  3. Click the Reserve button.

  4. If the date is available, you'll see a success message. If the date is already booked, you'll receive an error message.


File Structure

hotel-reservation-system/
├── index.html          # Main frontend interface
├── style.css           # Custom CSS for styling
├── script.js           # JavaScript for form submission
├── reserve.php         # PHP backend for handling reservations
├── reservations.txt    # File to store reservations (created automatically)
├── README.md           # Project documentation

Screenshots

screen hotel reserve

About

This Hotel Room Reservation System is a simple yet effective web application designed to manage room bookings for a hotel. It demonstrates the use of frontend technologies and backend PHP for handling data storage and validation. The project is ideal for learning how to build a full-stack web application with file-based data storage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published