Online Gas Booking System using PHP and MySQL

Welcome to the complete Online Gas Booking System package. This document explains everything you need to install, configure, and test the project on your own computer. If you follow the steps below exactly, the site will be up and running in minutes.

1. System Requirements

RequirementMinimum Version
PHP7.2 or higher
MySQL / MariaDB10.1 or higher
Web ServerApache (bundled with XAMPP/Wamp)
BrowserLatest Chrome / Edge / Firefox

2. Installation Guide (XAMPP)

  1. Install XAMPP server and start Apache & MySQL.Download from https://www.apachefriends.org/index.html
  2. Copy the entire 'gas_booking_system' folder into C:\xampp\htdocs\
  3. Open http://localhost/phpmyadmin, click 'Databases', and create a new DB named gas_booking_system.
  4. Select the new DB, click 'Import', choose gas_booking_system.sql, and press 'Go'. This will create all tables and seed default data.
  5. Open db.php and ensure these credentials match your environment:
    host: localhost
    dbname: gas_booking_system
    username: root
    password: (leave blank)
  6. Run the project in your browser: http://localhost/gas_booking_system/

3. Default Login Details

Role / PageUsername / EmailPassword
Admin  (/admin/)admin@example.comPassword
Delivery Staff  (/delivery/)delivery@example.compassword
User  (/user/)ramji@gmail.comRam123

4. Database Design (high‑level)

TablePurposeKey Columns (excerpt)
usersStores all accounts (admin, user, delivery)id, name, email, password, role
bookingsGas cylinder ordersid, user_id, quantity, booking_date, status
delivery_assignmentsMapping bookings ⇢ delivery staffid, booking_id, delivery_id, assigned_on
payments (optional)If you enable online payments laterid, booking_id, amount, txn_id, paid_on

5. Usage Workflow

  • User logs in, books a cylinder, and receives a booking ID.
  • Admin sees 'Pending' bookings and assigns a Delivery Staff member.
  • Delivery Staff logs in, marks order as 'In Transit' or 'Delivered'.
  • User dashboard displays live status updates.

6. Customization Tips

  • Replace assets/images/logo.png and edit partials/header.php to change branding.
  • Status labels (Pending, Confirmed, Delivered) are defined in config/constants.php.
  • Add more delivery staff by inserting new rows in the users table with role = delivery.
  • Enable PDF invoice generation by uncommenting code in admin/view-booking.php and adding the TCPDF library.

7. Troubleshooting

IssueFix
Blank page / error 500Enable error reporting in php.ini or add ini_set("display_errors", 1); at the top of index.php.
SQLSTATE[42S22] Unknown columnMake sure you imported this SQL file and not an older dump.
Login fails for all rolesVerify passwords are hashed; reset via phpMyAdmin using password_hash().

8. Need Help or Custom Features?

Email: projectworldsofficial@gmail.com
WhatsApp: +91-7000830947
Website: https://projectworlds.com

Buy Source Code ₹501

Posted in PHP, PHP Projects and tagged , , , , , , .