TourBookingSystem(TBS) is a PHP and MySQL based travel booking platform for browsing tour packages, registering users, creating bookings, completing payments, managing trips, and administering package data. The project also includes a built-in AI-style travel assistant with destination suggestions, package comparisons, budget guidance, and trip-planning features.
AI-powered tour booking system built with PHP and MySQL, featuring package browsing, secure bookings, payments, admin management, and a smart travel assistant.
php, mysql, tour-booking-system, travel-booking, travel-website, booking-system, ai-assistant, chatbot, admin-dashboard, user-authentication, payment-integration, xampp
This project is designed as a complete travel booking website with:
- Public landing page with featured destinations and travel sections
- User registration and login
- Package browsing with search, filter, sort, wishlist, and compare UI
- Booking flow for flight, train, hotel, and cab services
- Payment confirmation with transaction ID generation
- Booking history page for logged-in users
- Admin dashboard to manage packages, bookings, and payments
- AI travel assistant with chat history and smart travel guidance
- Create an account with username, email, password, mobile, and address
- Login using username or email
- Browse available packages from the database
- Filter packages by region, budget, and sort order
- Search packages by destination or description
- Book packages with multiple service types:
- Flight
- Train
- Hotel
- Cab
- Auto-calculated total booking price based on traveler count
- Complete payment using:
- Credit Card
- Debit Card
- UPI
- Net Banking
- View booking history and payment status
- Access AI travel assistant for destination help and travel recommendations
- Admin login from the same login page
- View platform statistics:
- Registered users
- Total packages
- Total bookings
- Total revenue
- Add new tour packages
- Delete packages
- Update booking status
- View completed payment records
The AI assistant is implemented inside ai_assistant.php and includes:
- Chat interface with persistent session-based chat history
- Destination knowledge base
- Package recommendation logic
- Trip planner
- Budget calculator
- Destination quiz
- Weather and travel tips style responses
- Auto-suggestions while typing
- Export chat option
- Fullscreen mode
- Copy-on-double-click for messages
- Frontend: HTML, CSS, JavaScript
- Backend: PHP
- Database: MySQL
- Local Server: XAMPP
- Session Handling: Native PHP sessions
TourBookingSystem/
├── admin.php
├── ai_assistant.php
├── booking.php
├── database.php
├── index.php
├── intele_tour.sql
├── login.php
├── logout.php
├── my_bookings.php
├── packages.php
├── payment.php
├── register.php
├── script.js
├── style.css
├── .env
├── images/
└── screenshots/
- Homepage
- Featured packages
- Gallery
- Testimonials
- FAQ
- Newsletter and contact form UI
- Lists all packages
- Supports filtering, sorting, and searching
- Adds extra package records if they do not already exist in the database
- Includes wishlist and compare UI
- Booking form for selected package
- Supports flight, train, hotel, and cab booking flows
- Validates dates and traveler count
- Creates booking and redirects to payment
- Completes payment for a booking
- Generates a unique transaction ID
- Marks payment as completed
- Updates booking status to confirmed
- Shows a logged-in user all bookings
- Displays payment status and transaction ID
- User login
- Admin login
- New user registration
- Password hashing using
password_hash
- Admin dashboard for package, booking, and payment management
- MySQL database connection
- Common helper functions:
clean()redirect()isLoggedIn()isAdmin()packageImageUrl()
The database file is intele_tour.sql.
userspackagesbookingspaymentsadminschat_historyis auto-created byai_assistant.phpif it does not already exist
The SQL file inserts:
- Sample packages:
- Paris
- Tokyo
- Bali
- Dubai
- Default admin record
The project currently allows admin access with:
- Username:
admin - Password:
admin123
Important: This is suitable only for local/demo use. Change it before any real deployment.
Place the project in your XAMPP htdocs directory:
d:\xampp\htdocs\TourBookingSystem
Use the XAMPP Control Panel and start:
- Apache
- MySQL
Open phpMyAdmin or MySQL and import:
This creates:
intele_tourdatabase- Required tables
- Sample package data
- Default admin
The current database config is in database.php:
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'intele_tour');Update it if your local MySQL configuration is different.
Visit:
http://localhost/TourBookingSystem/
The repository contains a .env file with OpenAI-related variables:
OPENAI_API_KEYOPENAI_MODEL
At the moment, the PHP code in this repository does not directly read those values, so they appear to be reserved for future integration or external tooling.
Security note:
- A real API key should never be committed to GitHub.
- Rotate the existing key immediately if it is still active.
- Replace it with your own local secret file or create a
.env.examplewithout secrets before publishing the repository.
Suggested .env.example:
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4o-mini- User registers an account
- User logs in
- User opens the packages page
- User selects a package
- User fills the booking form
- Booking is created with
pendingstatus - User completes payment
- Payment is stored with a generated transaction ID
- Booking is updated to
confirmed - User can review the trip in
My Bookings
Current implementation includes:
- Password hashing for user accounts
- Prepared statements in several important flows
- Session-based access control for user and admin pages
- Input validation for email, password length, dates, and traveler counts
Current limitations to be aware of:
- Admin login uses a hardcoded password path in
login.php - Some admin update/delete queries still use interpolated SQL
- The
.envfile currently contains a real secret and should not be committed - Payment processing is simulated, not connected to a live gateway
- AI assistant behavior is rule/knowledge-base driven, not a live LLM integration in the checked-in code
The project already includes screenshots in the screenshots folder.
- No real payment gateway integration
- No email confirmation system
- No password reset flow
- No role-based admin management beyond the current single-admin approach
- No production deployment configuration
- Some UI text contains encoding artifacts and can be cleaned up
- Integrate a real payment gateway
- Move admin authentication fully into the database with hashed password checks
- Add package image upload support
- Add booking cancellation from the user dashboard
- Add email notifications
- Add proper
.envloading in PHP - Add CSRF protection
- Add PHPUnit or integration testing
- Add Docker setup
- Add responsive menu improvements for mobile
TourBookingSystem
AI-powered tour booking system built with PHP and MySQL, featuring package browsing, secure bookings, payments, admin management, and a smart travel assistant.
php, mysql, tour-booking-system, travel-booking, travel-website, booking-system, ai-assistant, chatbot, admin-dashboard, xampp
No license file is currently included in the repository. If you plan to publish this project, add a license such as MIT.
Built as an InteleTour travel booking platform project using PHP, MySQL, HTML, CSS, and JavaScript.





