Skip to content

anabxathag/Hotel_booking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Nine Hotel — Hotel_booking

Simple PHP + MySQL frontend for a hotel reservation system. UI uses MDBootstrap + jQuery; backend is plain PHP with mysqli. Provided SQL dump seeds a complete sample database.

Features

  • Public homepage with carousel, gallery, contact map.
  • Signup / login flows and session-based account pages.
  • Rooms listing and room detail pages.
  • Reservation, payment and basic admin/owner/receptionist tables (seeded).
  • Static assets (CSS/JS/images) in static/.
  • Server-side templates in templates/.

Quick repo layout

  • index.php — public entry (homepage)
  • templates/ — PHP pages (login, signup, DB connect, roomdetail, profile, admin pages, etc.)
  • static/ — CSS, JS and images
  • 9hotel_reservation.sql — database dump (schema + seeded data)

Requirements

  • PHP 7.4+ with mysqli
  • MySQL / MariaDB
  • Web server (XAMPP, WAMP, IIS) or PHP built-in server
  • (Optional) phpMyAdmin or mysql CLI to import the SQL dump

Setup (Windows, PowerShell)

  1. Put the project in your web root (e.g. XAMPP htdocs) OR run built-in server:

    cd './Hotel_booking'
    php -S localhost:8000
    # then open http://localhost:8000/index.php
  2. Create the database and import the provided SQL:

    • Using phpMyAdmin: create database name (e.g. 9hotel_reservation) then import 9hotel_reservation.sql.
    • Using MySQL CLI:
      mysql -u root -p
      CREATE DATABASE 9hotel_reservation CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
      EXIT
      mysql -u root -p 9hotel_reservation < "./9hotel_reservation.sql"
  3. Configure DB connection:

    • Edit templates/connect.php and set host, username, password, database name to match your environment.
    • Example connection variables you might see and edit:
      // inside templates/connect.php
      // $db_host = '127.0.0.1';
      // $db_user = 'root';
      // $db_pass = 'your_password';
      // $db_name = '9hotel_reservation';
      // $conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);
  4. Start the app and test:

    • Open the homepage and navigate Rooms / Signup / Login flows.
    • If you seeded the DB, sample accounts exist under member table (roles: customer, owner, recep, etc.)

Notes & security

  • Do NOT commit credentials. If templates/connect.php contains real credentials, remove them from git history and rotate them.
  • The SQL contains seeded user emails and bcrypt password hashes used in development only.
  • Sanitize/validate user input before deploying to production.

Troubleshooting

  • "Repository not found" when pushing: ensure remote URL is correct and you have permissions; create the remote repo on GitHub or use gh repo create.
  • DB connection errors: verify credentials and the database name in templates/connect.php.
  • Blank Rooms menu: verify room table rows exist and connection is successful.

License

Add a LICENSE file if you plan to publish (e.g. MIT).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published