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.
- 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.
- 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)
-
Clone the Repository:
git clone https://github.com/your-username/hotel-reservation-system.git cd hotel-reservation-system
-
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
-
Access the Application: -Open your browser and go to http://localhost:8000.
-
Open the application in your browser.
-
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.
-
-
Click the Reserve button.
-
If the date is available, you'll see a success message. If the date is already booked, you'll receive an error message.
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