Online Railway Reservation System in PHP/OOP Project Free Source Code



This is a PHP Project entitled Online Railway Reservation System. It is a web-based application that provides an online platform for railway or train station passengers or possible passengers to explore their schedules and reserve a seat. This application does not support any payment API and was developed only for educational purposes to give an idea to the IT/CS students and self-taught programmers about how to develop a web application like this. The application has a pleasant user interface using Bootstrap Framework and AdminLTE Framework. It is easy to use or user-friendly.

About the Online Railway Reservation System

I developed this project using the following:

  • XAMPP v3.3.0 as my local webserver that has a PHP Version 8.0.7
  • PHP Language
  • MySQL Database
  • HTML
  • CSS
  • JavaScript
  • jQuery
  • Ajax
  • Bootstrap
  • AdminLTE
  • and some other plugins/libraries.

The Simple Online Railway Reservation System has 2 modules which are the Management Side and Public Side. The Management Module is the side of the system where the management can manage the system information, schedules, and reservations. On this side, the admin user can update also the content pages that are shown on the website such as the 'About' and 'Contact' Information Contents. The Public Module serves as the website that can be accessed by visitors or possible passengers. The visitors can read the information about the station, list the schedules, and reserve their seats on their selected schedule. The passenger can submit multiple seat reservations at once.


Management Side

  • Secure Login and Logout
  • Dashboard
    • Display Summary
  • Manage Trains
    • Add New Train
    • List All Trains
    • Update Train Details
    • Delete Train Details
  • Manage Schedules
    • Add New Daily Schedule
    • Add New One-Time Schedule
    • List All Daily Schedule
    • List All One-Time Schedule
    • Update Schedule Details
    • Delete Schedule
  • Manage Reservation
    • List All Reservations
    • View Reservations Details
    • Print Reservations Details
    • Delete Reservations Details
  • Manage Inquiries
    • List All Inquiries
    • View/Read Inquiry Details
    • Delete Inquiry Details
  • Manage Users list (CRUD)
  • Manage Account Details/Credentials
  • Manage System Information

Public Side

  • Home Page (Displays the Welcome Content)
  • Display Railway's Schedules
  • Filter Schedule or Search Available Schedule near the entered date and time
  • Submit Reservation
  • Print Reservation Ticket(s)
  • Read About Content
  • Send Inquiry

System Snapshots of some Features

Schedule List (Public Side)

Online Railway Reservation System

Reservation Form (Public Side)

Online Railway Reservation System

Generated Reservation Tickets (Public Side)

Online Railway Reservation System

Reservation List (Management Side)

Online Railway Reservation System

Reservation Details Modal (Management Side)

Online Railway Reservation System

How to Run ??


  • Download and Install any local web server such as XAMPP/WAMP.
  • Download the provided source code zip file. (download button is located below)


  1. Open your XAMPP/WAMP's Control Panel and start Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming orrs_db.
  6. Import the provided SQL file. The file is known as orrs_db.sql located inside the database folder.
  7. Browse the Online Railway Reservation System in a browser. i.e. http://localhost/orrs/

Default Admin Access Information

Username: admin
Password: admin123


That's it. You can now explore the features and functionalities of this Online Railway Reservation System in PHP. I hope this project will help you with what you are looking for and you'll find something useful for your future projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

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 for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


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.


Submitted byreginaldo trigueiros (not verified)on Wed, 01/19/2022 - 09:37


the code is not running at localhost/orrs. it shows this error-> Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Apache/2.4.51 (Win64) PHP/7.4.26 Server at localhost Port 80
Submitted bytthhaion Tue, 01/31/2023 - 23:47

This cms has an unauthenticated rce vulnerability in the pecl installation, specifically because the index.php parameter does not have good security validation for the $page parameter
the poc is below:
This can later lead to arbitrary command execution

Submitted byFr (not verified)on Sun, 04/16/2023 - 07:57

I don't have the css, and when i try to go to "admin login", it says "Not Found The requested URL was not found on this server." help please
Submitted bySadick bakomeye (not verified)on Sun, 01/21/2024 - 20:03

How to create railway management systems

Add new comment