Rest Riser is a full-stack web application designed to provide a seamless hotel booking experience, inspired by Booking.com. The platform allows users to browse available rooms, check booking availability, contact the hotel, and manage their accounts through a user-friendly interface. It includes both user and admin dashboards for managing bookings and user data, ensuring a robust and secure experience for all stakeholders.
- Room Browsing & Booking:
Users can explore available rooms with details such as features, facilities, pricing, and guest capacity. A booking availability checker allows users to input check-in/check-out dates and guest information. - Contact Form:
A secure contact form enables users to send inquiries, with data stored in a MySQL database for easy management. - User Authentication:
Secure session-based authentication allows users to log in, access their dashboard, and manage their profiles. - Admin Dashboard:
Admins have access to a comprehensive dashboard to manage users, verify accounts, and delete users (except their own account). - Responsive Design:
Built with Bootstrap, the platform is fully responsive, ensuring compatibility across desktops, tablets, and mobile devices. - Interactive Map:
Embedded Google Maps for location visualization on the contact page. - Social Media Integration:
Links to social media platforms for enhanced user engagement. - Facilities & Testimonials:
Dedicated sections to showcase hotel facilities and customer testimonials, enhancing trust and user experience. - Occasion Booking:
A placeholder for future implementation of special event or occasion booking functionality.
- HTML5, CSS3, JavaScript
- Bootstrap 5 for responsive design
- Bootstrap Icons for UI enhancements
- PHP 7.x/8.x for server-side logic
- MySQL for database management
- MySQL with tables for users and user queries
- Google Maps Embed API for location display
- PHP sessions for user authentication and state management
- Input sanitization using
htmlspecialcharsandmysqli_real_escape_string - Email validation with
filter_var - Prepared statements for secure database queries
- rest-riser/
- about.php
- contactUs.php
- dashboard.php
- Facilities.php
- index.php
- Ocassion.php
- Rooms.php
- testoo.php
- inc/
- header.php
- footer.php
- link.php
- README.md
The application uses a MySQL database named Hotelreservation (or booking_db in some files). Key tables include:
| Field | Type | Description |
|---|---|---|
| id | INT, PK | Auto-increment primary key |
| name | VARCHAR | User's full name |
| VARCHAR | User's email address | |
| role | VARCHAR | User role (admin or user) |
| verified | TINYINT | Verification status (0 or 1) |
| created_at | TIMESTAMP | Account creation timestamp |
| last_login | TIMESTAMP | Last login timestamp |
| Field | Type | Description |
|---|---|---|
| name | VARCHAR | Sender's name |
| VARCHAR | Sender's email | |
| subject | TEXT | Message content |
Note:
Ensure consistency in database names (Hotelreservationvs.booking_db) across all files before deployment.
- Web server (e.g., Apache)
- PHP 7.x or 8.x
- MySQL 5.x or later
- Git (for cloning the repository)
-
Clone the Repository:
git clone https://github.com/your-username/rest-riser.git cd rest-riser -
Configure the Web Server:
- Place the project folder in your web server's root directory (e.g.,
htdocsfor XAMPP). - Ensure the server supports PHP and MySQL.
- Place the project folder in your web server's root directory (e.g.,
-
Set Up the Database:
- Create a MySQL database (e.g.,
Hotelreservation). - Import the necessary tables (create
usersanduserqueriestables as per the schema above). - Update database credentials in
contactUs.phpanddashboard.php:Replace$conn = new mysqli("localhost", "root", "", "Hotelreservation");"root","", and"Hotelreservation"with your MySQL username, password, and database name.
- Create a MySQL database (e.g.,
-
Run the Application:
- Start your web server and MySQL service.
- Access the application via http://localhost/rest-riser/index.php.
- Create an admin user in the
userstable withrole = 'admin'. - Log in to access the admin dashboard at
dashboard.php?view=admin.
- Homepage: Browse rooms, check availability, and navigate to other sections.
- Rooms: Filter rooms by availability, facilities, and guest count.
- Contact Us: Submit inquiries via the contact form.
- Dashboard:
- Users: View and manage personal account details.
- Admins: Manage all users, verify accounts, and delete users.
- Facilities & About: Learn about the hotel's amenities and background.
- Occasion Booking: Currently a placeholder for future development.
- Inconsistent database names (
Hotelreservationvs.booking_db) may cause connection errors. - The
Ocassion.phpfile is empty and requires implementation. - The
testoo.phpfile is referenced but not provided; it may be a placeholder or missing. - Limited booking functionality; actual booking processing logic is not fully implemented.
- Social media links in
contactUs.phpare placeholders (href="#").
- Implement full booking functionality with payment integration.
- Complete the occasion booking feature in
Ocassion.php. - Add user registration and password recovery features.
- Enhance security with password hashing and CSRF protection.
- Optimize database queries for better performance.
- Expand testimonial and facility sections with dynamic content from the database.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -am 'Add your feature' - Push to the branch:
git push origin feature/your-feature - Open a pull request.
Please ensure your code follows the project's coding standards and includes appropriate documentation.
Thank you for exploring Rest Riser! We hope you enjoy using this platform as much as we enjoyed building it.