Online Ticket Reservation System in PHP with Source Code

A fully functional project based on Online Ticket Reservation System that uses PHP Language with MySQL database. Following PHP project contains all the essential features which can be in use for the final year IT students for their college projects. It has a number of features that will allow users to manage online schedules as well as their reservations. This system as well as the web application’s concept is all clear, it’s the same as real-life scenarios and well-implemented on it. To download free online ticket reservation system project in PHP MySQL with source code files, please scroll down to the bottom of this post for the Download button.

About Online Train Ticket Reservation System PHP Project

Moving on, this train ticket management system project in PHP focuses mainly on online ticket reservations and schedule management. Also, the system displays all the lists of available schedules according to their class prices. In addition, the system allows managing trains, routes, and schedule information too. This project is divided into two categories: Admin, and Passenger. In an overview of this web application, a passenger can simply check for available schedules. In case of booking schedule, he/she has to enter the number of passengers by selecting classes. After this, the system displays a booking overview before proceeding towards the payment. As soon as the user completes his/her payment, the user can view their personal ticket information under the booking history section. Here, the passenger can check upon their ticket status, modify it and print tickets in PDF format. Besides, the user can send feedbacks regarding the system.

Admin Panel, Train and Route Management

On the other hand, an admin has full control over the system. An admin has the right to manage the proper flow of the system. The passengers can simply sign up and use the system. The admin can oversee the pieces of information of registered passengers. With it, the very first step of the management side falls upon the arrangement of train records. The administrator has to provide few details such as the name of the train with its capacity on the first and second class. Also, the admin has the right to manage train routes by providing various details. Indeed, these details include the names of address points. And lastly, now the administrator can proceed towards arranging schedules under various time periods.

Schedule Management

It is important to have a schedule arrangement in the right date time for the passengers in order to maintain their reservations. The admin must arrange a schedule on the future dates because the system only allows reservations for future dates. Therefore, the system allows adding a range of schedules and a one-time schedule for managing train schedules. In terms of a one-time schedule, the user has to select train, route, first & second class charge with date and time. Whereas, the system allows another date range field under a range of schedules. In fact, a one-time schedule works only for a specific mentioned date, where the other one stays active till its last-mentioned date. An admin can make changes to these schedules anytime and remove them from the records too.

Reports, Earnings and Feedback Management

In general, the system prepares a report highlighting the details of a particular reserved route and train. Of course, this whole report comes in the format of PDF. It shows details such as passenger’s name, seat number, class code with date and time. Similarly, the admin can view all the earning history with its total collection under first & second class, and seat capacity. Meanwhile, this section represents the total number of ticket sales per route and trains with their respective collection figures. Furthermore, the passenger can send feedbacks and all the feedbacks are listed under the administrative dashboard, where he/she can take action. Besides, the administrator can search details using the passenger’s ticket number and have an overview of total earnings with other fields too.

Last but not least, a clean and simple dashboard is presented with simple color combinations for a greater user experience while using this Online Ticket Booking System Project in PHP MySQL. Indeed its UI elements, a free open-source CSS framework; Bootstrap is on board with Vanilla CSS too. Presenting a new Train Ticket Booking System Project in PHP MySQL which includes an admin panel with a passenger’s panel that contains all the essential features to follow up, and a knowledgeable resource for learning purposes.

Available Features:
  • Admin Panel
  • Passenger’s Panel
  • Make Reservations
  • View Booking History
  • Print Tickets (PDF)
  • QR Code
  • Send Feedbacks
  • Schedule Management
  • Ticket Expiration
  • Train Management
  • Routes Management
  • Passenger Registration
  • Download Booking Reports
  • View Earning Reports
  • Feedback Management
  • Total Earnings
  • Search Passenger’s Ticket Information
Project Name:Online Ticket Reservation System PHP
Language/s Used:PHP
PHP version (Recommended):7.4
Database:MySQL
Type:Web Application
Developer:Adelabu Oluwatoyin Simbiat
Updates:0
Online Train Ticket Booking System PHP Project Overview

Instructions: How to Run?

  • After you finish downloading the project, unzip the project file and head over to your XAMPP directory.
  • There you’ll find a folder naming “htdocs”.
  • Inside the “htdocs” folder, paste the project folder (not the .zip one, but the extracted one).
  • Open your favorite browser; we recommend using Google Chrome or Mozilla Firefox.
  • Then, go to URL “http://localhost/phpmyadmin“.
  • Create a Database with a name that is provided inside the “01 LOGIN DETAILS & PROJECT INFO.txt”.
  • Finally, click on the “Import” tab and choose the database file (.sql) which is provided under the folder naming “DATABASE FILE”.
  • After setting up all these, go to URL “http://localhost/[ PROJECT_FOLDER_NAME ]/“
  • All the login details are provided inside the project folder, check that out and enter in order to use it.

And there you have it, a full setup of the Online Ticket Reservation System Project in PHP MySQL. For this particular PHP project, PHP Version 7 or Newer is required because the project might not operate well with the oldest PHP version. So, users with the oldest PHP version (less than 7) might face various problems while operating it. As a result, you’ll need to upgrade your PHP version (only if you’re using the oldest version) at the moment. Download Free Ticket Booking System Project in PHP MySQL Source Code. So, this Online Ticket Reservation System PHP project is a fully functional project for all the beginners as well as intermediate levels that broads vast knowledge into such PHP web applications. In conclusion, this whole PHP project with free source code is an absolute project. And, a meaningful way for the users to learn and explore more about it.

Free Download Online Ticket Reservation System Project in PHP MySQL with Source Code:
Click the Download Button Below to Start Downloading

Note: Only for Educational Purpose

79 comments

  1. i have inserted text secret key api in $paystack in constant.php, but after successful checkout there is no alert and “view booking” nothing, can you help me?

      1. Thank you for replying to me
        Did you mean add “http://localhost/train/pro/individual.php?page=paid&now=true” in “Test Callback URL” ?
        after successful payment, there was a floating message and returned to “view bookings” but there was no purchased ticket, it was empty.
        please help me

          1. I have inserted the same link as you
            “http://localhost/train/pro/individual.php?page=paid&now=true/”
            but after successful payment return to “view bookings” there is nothing. can you help me, thank you very much

  2. I Always got this Fatal error: Uncaught Error: mysqli object is already closed in C:\xampp\htdocs\train\pro\individual_reg.php:26 Stack trace: #0 C:\xampp\htdocs\train\pro\individual_reg.php(26): mysqli->prepare(‘SELECT * FROM p…’) #1 {main} thrown in C:\xampp\htdocs\train\pro\individual_reg.php on line 26

  3. Warning: mysqli::__construct(): (HY000/1049): Unknown database ‘otrsphp’ in C:\xampp\htdocs\train\conn.php on line 5

    Fatal error: Uncaught Error: mysqli object is already closed in C:\xampp\htdocs\train\pro\adminsignin.php:23 Stack trace: #0 C:\xampp\htdocs\train\pro\adminsignin.php(23): mysqli->prepare(‘SELECT * FROM u…’) #1 {main} thrown in C:\xampp\htdocs\train\pro\adminsignin.php on line 23

    this is my problem in sign up

  4. i have done exactly as the demo shown. after payment received(through email) and automatically return to “view booking pages”, system does not add new booking. I have search paystack account thoroughly yet still did not work. I used test secret key only. can u help me sir ( :-(( )

    1. btw the transactions are already received at “Transaction” tab in paystack.com. But in the system still did not insert the booking into the database.

        1. already setup properly as “http://localhost/train/pro/individual.php?page=paid&now=true/” in the callback url in the paystack account

  5. kindly i need support, i can not link my gateway and i found the api/paystack in the more than one file, so how i link my gateway.
    note: my gateway has a login name and password and url

  6. i check the paystack web site and it has no my country within options, i have my own gateway so can i put it in the source code and system work with it

  7. Fatal error: Uncaught Error: mysqli object is already closed in C:\xampp\htdocs\train\train\pro\adminsignin.php:23 Stack trace: #0 C:\xampp\htdocs\train\train\pro\adminsignin.php(23): mysqli->prepare(‘SELECT * FROM u…’) #1 {main} thrown in C:\xampp\htdocs\train\train\pro\adminsignin.php on line 23

      1. Please I really need your help on error.
        Warning: include(individual/make_payment.php): failed to open stream: No such file or directory in C:\xampp\htdocs\train\pro\individual.php on line 150

          1. When I press the pay now button after choosing my booking class and number of seats in the passenger’s panel.

          2. Looks like you’ve changed the name of the project folder. Please do not change the name of it without making certain changes to the coding section! [There are various URLs set with that particular project folder name]

  8. i got this problem when i print the ticket Fatal error: Uncaught Error: Call to undefined function ImageCreate() in C:\xampp\htdocs\train\phpqrcode\qrimage.php:74 Stack trace: #0 C:\xampp\htdocs\train\phpqrcode\qrimage.php(32): QRimage::image(Array, 11.45, false) #1 C:\xampp\htdocs\train\phpqrcode\qrencode.php(494): QRimage::png(Array, ’34.png’, 11.45, false, false) #2 C:\xampp\htdocs\train\phpqrcode\qrencode.php(286): QRencode->encodePNG(‘Demo Account Ti…’, ’34.png’, false) #3 C:\xampp\htdocs\train\constants.php(670): QRcode::png(‘Demo Account Ti…’, ’34.png’, 0, 11.45, false) #4 C:\xampp\htdocs\train\constants.php(516): generateQR(’34’, ‘Demo Account Ti…’) #5 C:\xampp\htdocs\train\pro\individual.php(7): printClearance(’34’) #6 {main} thrown in C:\xampp\htdocs\train\phpqrcode\qrimage.php on line 74

  9. hii,
    i am not able to delete the records of routes trains details and anything data. its showing foreign key error as the this tables are link to each other . please help me out , as my miss told to do it mandatory

  10. Hey bro!
    I download the source code but there is no file by name of constant.php.
    And please help me how to I insert my own api key in paystack.
    Also please send me the constant.php file.

    1. “constants.php” is present right there after you open the main project folder. In fact, you should’ve tried using search fn under the project folder!

  11. Hi, I don’t know to solve this, I have replace my test keys and the payment works fine, but after the payment, it does show the payments in the in both the passenger and the admin sides (it has no effect on both). What should I do.

  12. If a passenger has booked a ticket from the first class then the capacity is reduced from the second class.
    Can you help me about this issue?

  13. how do we remove the train background picture from the main page? Probably me? but i dont see the option to remove it from the index.php? please advise.

      1. thankyou for kind reply sir, I have change to my personal image, but when refreshing the webpage it still show the train? is there other place I need to change also? please advise 🙂

        1. for some reason, the changes I made on the style.css file is not taking effect? I have try saving style.css file and restarting apache and MySQL server with same issue.
          – I also look at the development setting on the .main heading from chrome and it still point to the train.jpg file(the old one)? even I have already rename it to a new image called train2.jpg which exist in the images directory? this is the issue i observe 🙁
          – from the style.css I can click on the follow link on the “url(…….train2.jpg)” and it’ll take me to the correct picture., so I wonder if something else I am missing.

  14. Thanks sir, looks like there’s some cache issue? after changing the picture 🙁 anyways I can contact you personally via email?

  15. Hello
    When i sign up as new customer…
    It shows please follow the number format ..i tried adding d same contact number thats given for demo customer ..still showing the same…
    Whats the contact number format?

  16. Is there a way I can code out API payment and just allow the program to insert the booking in the database without having to make a payment?

Leave a Reply

Your email address will not be published.