Online Bus Ticket Reservation Using PHP/MySQLi with Source Code

Language

The Bus Ticket Reservation System using PHP/MySQLi is my thesis, I upload this project because I want to help thus other programmers. One of the features of this project is it has a seat inventory feature, in which you cannot reserve the seat that has been already reserve with others. This system allows the customer or the passenger to instantly reserve their bus ticket and has a simple printable ticket. Download this code and try it with your own, to see the other function behind this code.

This Project was originally written using PHP/MySQL and may not work properly to PHP higher versions because some of the functions were deprecated or removed on these PHP versions. And as of now December 7, 2020, this Bus ticket Reservation System is now upgraded to PHP/MySQLi so that the error occurrence will be lessened, and yes I may have missed some functions to update and just try to find some answers from the internet but as far I have checked the system, I haven't encountered any error yet since I have upgraded this system.

Some of these system data are dynamic and some are static. This project has an admin side where you can manage the dynamic data in the database.

Features

Passenger Side or the Website

  • Home Page
    • This is the page where the customer or passengers will be redirected by default when browsing the website and also this is where they can reserve or book their bus ticket.
  • Gallery Page
    • The page where some additional images or images of the companies events or etc are displayed. This page is static and can be only updated by editing the specific file in the source code.
  • History Page 
    • The page where the bus company history content is being shown and the same as the Gallery Page the data on this page are static.
  • Routes Page
    • The page where the routes list are shown along with the bus departure schedules.
  • Location Page
    • The page that displays the map view of the location of the bus company.
  • Contact Us
    • The page where the contact information of the bus company is being displayed.

Admin Side

  • Login panel
    • This panel can be navigated from the website home page by clicking the admin button below the ticket booking form. This the form where the system admin will submit his/her system credential to access the admin side of the system.
  • Dashboard Page
    • The default page where the system admin will be redirected after logging into the system. This page list the passengers booking or reservation. The admin can update the status or delete the reservation data.
  • Bus Page
    • The page where buses of the company are listed along with the details of the bus route and other details. The admin can manage the list by adding a new bus, updated the bus information, and delete the bus from the list.
  • Seat Inventory Page
    • The page where the reserved seats are listed and can be managed by the admin.

How to Run

  1. Download the source code and extract the zip file.
  2. Download or set up any local web server that runs PHP script.
  3. Open the web-server database and create a new database name "ticket".
  4. Import the SQL file located in the database folder of the source code.
  5. Copy and paste the source code to the location where your local web server accessing your local projects. Example for XAMPP('C:\xampp\htdocs')
  6. Open a web browser and browse the project. E.g [http://localhost/busreservation]

Admin Default Access

Username: admin
Password: admin

Installation Demo

Enjoy Coding :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

for that you have to install xampp. after installing it u can see htdocs file. save this code inside that folder give it a name(foldername) . and then open your browser and type localhost/foldername.

i followed the step given by you, but i found some element missing. admin login is gone, the route is empty. the sql is already imported into database though..what kinda a mistake i have done?
Submitted byAnonymous (not verified)on Wed, 02/06/2013 - 19:17

The login page is not showing
Submitted bysanjaySANJU (not verified)on Wed, 11/01/2017 - 18:08

In reply to by Anonymous (not verified)

Hi i am also facing the same problem regarding the login page. I am not able to find the login page and also i am also not ABLE TO SELECT THE ROUTE
Submitted byAnonymous (not verified)on Thu, 02/07/2013 - 16:40

its good ! the problem is ? the loading is very tagal !
Submitted byAnonymous (not verified)on Mon, 02/25/2013 - 14:50

Hi. How can i run this? I'm just new in php. Thank you
Submitted byAnonymous (not verified)on Sat, 04/27/2013 - 20:56

I thnk the system is quiet ayt.. i like it... yah a prob with it loadin pages.. might be caused by that ajax script
Submitted byAnonymous (not verified)on Wed, 05/15/2013 - 18:40

Hello, Nothing in this project. Because different person can select same bus sheet.

1st download WinRAR software and install 2nd right click on the rar file & select extract all file 3rd start the xampp 4th move extract file path of installed xampp example:c/programfile/xamplet/htdocs/extract file put hear 5th initialize browser any one either ex,mozila,crome.opera then put on the address bar localhost/extract file folder/index.php then press enter just you get whatever you need This advice from Ethiopia dawit 10q
Submitted bySubash (not verified)on Sat, 07/20/2013 - 17:56

Hello, Can I buy your script with small changes. If you are interested, please reply to aneslin(at)gmail.com

I want to run this in localhost I created the database and imported the sql file, but i can't get the result. As well us how can i modify hostname, database name to check this website online....?
Submitted bylotte (not verified)on Wed, 08/14/2013 - 21:54

san ko po b dapat i-paste tong ticket.sql? tnx and godbless...
Submitted byjaypaxy (not verified)on Wed, 08/21/2013 - 21:03

hey i really wanted to try out your code but i cant see the zip file
Submitted byJackWitsonon Tue, 11/26/2013 - 15:14

This article gives the light in which we can observe the reality. This is very nice one and gives in depth information.
Submitted bysona (not verified)on Tue, 12/10/2013 - 19:00

hey, superb site... can you tell me hw many tables did u create in the databse..???
Submitted byLaxmi Rana (not verified)on Thu, 12/12/2013 - 12:48

I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.
Submitted byJackWitsonon Fri, 02/14/2014 - 16:31

Your blog is truly sensational as always. Great work. Keep it up. Looking forward to reading some more of your blog postings.
Submitted byMAJID KHAN (not verified)on Wed, 03/12/2014 - 19:04

Thank You very Much............
Submitted bypradeepsingh (not verified)on Fri, 04/04/2014 - 15:41

This is very much great and hope fully nice blog. Every body can easily found her need able information. I am visit first time but I fond many use full article. I will back again when get time.
Submitted byjoseph th (not verified)on Fri, 05/02/2014 - 14:21

thank you chritian for your valuable project.Hopefully i will learn much more about php scripting in this project.THANKS..
Submitted byarshi (not verified)on Sun, 05/11/2014 - 02:06

the index page is running but there is no any data to proceed. means its not showing anything like routes n all. is that important to import the database plzz help.
Submitted byjayaraj (not verified)on Mon, 06/16/2014 - 18:33

plse anybody help me how to work this database. how to connect this data abse. ples tell me full procedure for this website showing result

Go to phpmyadmin page make new database give it name to (ticket) after this then go to Sql Tabe and paste the code that u already download it)click on go and enjoy ..
Submitted byhenrysoft (not verified)on Mon, 08/11/2014 - 07:09

You did a nice job. keep it up
Submitted byPedro Nunes (not verified)on Tue, 08/19/2014 - 07:30

Already tried everything to activate the database on my server but gives only to create new database in my Mysql database and shopmp5_ticket
Submitted bykaviyarasu.s (not verified)on Mon, 09/01/2014 - 12:13

i like the php
Submitted byallan dhoye (not verified)on Fri, 01/16/2015 - 18:25

thanks alot for the code. it has really helped me to finalize on my final project
Submitted byvinckool (not verified)on Mon, 04/06/2015 - 01:06

How can I add other transport operators. Example if I have transport A B and C how can I integrate the three transport company into this app so that clients can browse through the three tranport copanies and make decision on what's best for them

Submitted byThanks Man (not verified)on Mon, 10/26/2015 - 05:52

Really thank you man for this, i really saved my ass on some project.
Submitted byRosemary (not verified)on Mon, 01/04/2016 - 22:49

Thank Chris. The project is cute and on point. Very easy to work with as long as phpmysql is concerned. But will want to use php lastest technologies for this like (Mysqli OR PDO) functions. Great Job man! Love to meet your kind in person cos you are opened.
Submitted byemilo (not verified)on Sat, 11/23/2019 - 20:13

In reply to by Rosemary (not verified)

can you pleas help me with these?
Submitted byHabib OLOU (not verified)on Sun, 12/18/2016 - 03:12

Hello, the adminhome.html does not contain any code. Meaning that it is blank.
Submitted byAbdirahman Ibrahim (not verified)on Fri, 04/07/2017 - 02:01

I was directed to this site by a friend, It is one of the sites that I have been looking for the rest of my life. Thank you so much.
Submitted byMoh Hamzaon Thu, 10/05/2017 - 06:39

Awesome program. It's so cool and simple everything working perfectly
Submitted byCHRISTIAN PAUL (not verified)on Tue, 02/20/2018 - 21:23

THE FRONT PAGE SHOWN NOTHING AT ALL ? HOW CAN I RESOLVE THIS ?
Submitted byhelp please (not verified)on Fri, 02/23/2018 - 10:25

wla pong login saka d ko makita ung route data pero po naka import naman sya pa help please
Submitted bybismillafridi (not verified)on Tue, 03/20/2018 - 15:32

Hello from where i can download this application
Submitted bysaiyan (not verified)on Thu, 10/21/2021 - 05:19

Thank you so much for this great project. really nice project. please Can i have your thesis file to know more explanation and so on because i am planing to make a report paper on it. here is my mail id- [email protected]

Add new comment