Streamline Event Planning with a Comprehensive PHP & MySQL Event Management System

Rashmi Mishra
0

 

Event Management System

Project Overview: 

The Event Management System is a web application designed to facilitate event organization and participation. It features two distinct interfaces: an Admin Panel and a User Panel. Users can register, log in, and book events through the User Panel, while the admin can manage events and users through the Admin Panel. The system ensures smooth handling of event bookings and generates a unique ticket number for each booking.


Features and Functionality:

Admin Panel Features:

1.  Add Events: Admin can create new events with details like name, description, date, time, venue, and ticket price.

2.  Modify Events: Admin can edit event details or remove events.

3.  View Events: Admin can see all available events.

4.  Manage Users: Admin can view and modify user details.

User Panel Features:

1.  Modify User Profile: Users can update their personal information.

2.  View Events: Users can browse all available events.

3.  Book Event: Users can book events, generating a unique ticket number.

4.  View Bookings: Users can view their bookings and ticket numbers.

Landing Page Features(index.php):

1.  Login: For both users and admins to access their respective panels.

2.  Register: For new users to sign up for an account.


Steps to Develop the Project in PHP and MySQL

Step 1: Setup Environment

1.  Install XAMPP or WAMP server.

2.  Create a project directory in the htdocs folder (e.g., event_management).

3.  Start Apache and MySQL services.

Step 2: Database Design

Create a MySQL database (e.g., event_management) with the following tables:

1.  users:

o    id (Primary Key)

o    role (admin or user), 

name, 

email,

username,

phone, 

password,  

created_at, 

updated_at

2.  events:

o    id (Primary Key)

 event_name, 

event_description, 

event_date, 

event_location

event_price

event_image,

event_status, 

created_at, 

updated_at

3.  bookings:

o    id (Primary Key)

o    user_id (Foreign Key referencing users)

o    event_id (Foreign Key referencing events)

o    ticket_number,

o    created_at,

o    updated_at


SCREENSHOTS FOR CREATING TABLES WITH DETAIL





Step 3: Design the Application Structure

1.  Create folders for organization:

o    css: For styling.

o    includes: For reusable components like header.php and footer.php.

o    admin: For admin-related pages.

o    user: For user-related pages.

2.  Create a db_.php file to connect to the database.


Step 4: Develop the Features

1. Landing Page

  • Create index.php for login and registration forms.
  • Handle authentication in login.php and registration in register.php.

2. Admin Panel

  • admin/dashboard.php: Display event stats.
  • admin/add_event.php: Form to add events.
  • admin/manage_events.php: List of events with edit/delete options.
  • admin/manage_users.php: List of users with edit/delete options.

3. User Panel

  • user/dashboard.php: Display available events and user bookings.
  • user/profile.php: Form to modify user details.
  • user/book_event.php: Form to book an event and generate a ticket number.
  • user/my_bookings.php: Display user's booked events and ticket numbers.

4. Common Files

  • header.php, footer.php, and sidebar.php for layout consistency.
  • functions.php for reusable PHP functions (e.g., ticket generation).

Step 5: Style the Application

1.  Use Bootstrap for responsive design.

2.  Apply custom CSS for additional styling.


Step 6: Testing

1.  Test user registration, login, and role-based redirection.

2.  Test event management and user bookings.

3.  Verify ticket number generation.


Step 7: Deployment

1.  Host the project on a live server.

2.  Export the database and import it into the hosting server.

3.  Update database credentials in config.php.

The project straucture

Root Directory: event_management

event_management/

├── admin/                   # Admin Panel

   ├── add_event.php        # Page for adding new events

   ├── edit_event.php       # Page for editing an event

   ├── manage_events.php    # Page to list and manage all events

   ├── manage_users.php     # Page to list and manage users

   ├── dashboard.php        # Admin dashboard

   └── styles.css           # Specific CSS for Admin Panel

├── user/                    # User Panel

   ├── book_event.php       # Page for booking events

   ├── edit_profile.php     # Page for editing user profile

   ├── my_bookings.php      # Page for viewing user bookings

   ├── view_events.php      # Page for viewing all events

   └── dashboard.php        # User dashboard

├── includes/                # Common Includes

   ├── config.php           # Database connection file

   ├── header.php           # Header for all pages

   ├── footer.php           # Footer for all pages

   ├── sidebar_admin.php    # Sidebar navigation for Admin Panel

   ├── sidebar_user.php     # Sidebar navigation for User Panel

   └── functions.php        # Common PHP functions

├── assets/                  # Assets Folder

   ├── css/                 # CSS Files

      ├── main.css         # General styles for the website

      └── bootstrap.min.css # Bootstrap CSS

   ├── js/                  # JavaScript Files

      ├── main.js          # General JavaScript

      └── bootstrap.min.js # Bootstrap JS

   └── images/              # Images for the website

├── auth/                    # Authentication Module

   ├── login.php            # Login page

   ├── register.php         # Registration page

   ├── logout.php           # Logout functionality

   └── forgot_password.php  # Forgot password functionality (optional)

├── index.php                # Landing Page (Login/Register)

├── about.php                # Optional: About Page

├── contact.php              # Optional: Contact Page

├── README.md                # Documentation for the project

└── db_dump.sql              # SQL file for the database schema

Description of Key Files and Folders

Admin Folder

Contains pages for admin-exclusive features:

  • add_event.php: A form to add events.
  • edit_event.php: Edit existing events.
  • manage_events.php: List and manage events.
  • manage_users.php: Manage user profiles (view, edit, delete).
  • dashboard.php: Summary and analytics for the admin.

User Folder

Contains user-exclusive pages:

  • book_event.php: Form for booking an event.
  • edit_profile.php: Modify user details.
  • my_bookings.php: View booked events and ticket numbers.
  • view_events.php: Browse available events.
  • dashboard.php: User homepage after login.

Includes Folder

Reusable components:

  • config.php: Database connection script.
  • header.php and footer.php: Shared header and footer.
  • sidebar_admin.php and sidebar_user.php: Role-based navigation menus.
  • functions.php: Common utility functions like ticket generation and form validation.

Assets Folder

For static resources:

  • CSS: Contains all CSS styles, including Bootstrap and custom styles.
  • JS: JavaScript files for frontend interactions.
  • Images: Stores images used on the site (e.g., logos, event banners).

Auth Folder

Manages authentication processes:

  • login.php: Allows admin and users to log in.
  • register.php: User registration form.
  • logout.php: Ends user session.

.....Here I give the project folder structure and in the downlaod project folder files are in direct root folder .You can arrange the files in respective folder and deploy your project as using the folder structure in php.


ScreenShots Of EMS in PHP

Landing Page: (index.php)

register.php


login.php















Download the source code ...




Steps How to run this project on your Computer

Step 1: Install a Local Server

1.  Download and install a local server like XAMPP or WAMP.

2.  Ensure that the installation includes PHP, Apache, and MySQL.


Step 2: Download the Project

1.  Obtain the project files in a compressed format (e.g., .zip) or clone it using Git if available.

2.  Extract the project folder to your local machine.


Step 3: Place the Project in the Web Server Directory

1.  Locate your web server's root directory:

o    For XAMPP: C:\xampp\htdocs

o    For WAMP: C:\wamp\www

2.  Move the extracted project folder to this directory. For example:

C:\xampp\htdocs\my_project


Step 4: Start the Server

1.  Open the control panel of your local server (XAMPP/WAMP).

2.  Start Apache and MySQL services.


Step 5: Configure the Database

1.  Open your browser and go to:

o    For XAMPP: http://localhost/phpmyadmin

o    For WAMP: http://localhost/phpmyadmin

2.  Create a new database:

o    Click on "New" in phpMyAdmin.

o    Enter the database name , which you can found drom you db_connect.php file of your project folder (e.g., eventmanagement) and click "Create."

3.  Import the database:

o    Click on the newly created database.

o    Go to the "Import" tab.

o    Choose the .sql file provided with the project (usually named db.sql or database.sql or your_project_name.sql in your db folder in your project folder).

o    Click "Go" to import.


Step 6: Configure the Project

1.  Open the project folder.

2.  Locate the configuration file for database connection (usually named db.php, db_config.php, or in an /includes directory or in /db durectory).

3.  Update the database credentials:

$host = 'localhost';

$username = 'root';

$password = ''; // Leave blank for local servers

$database = eventmanagement'; // Replace with the name of your database


Step 7: Access the Project

1.  Open your browser and navigate to:

http://localhost/my_project

Replace my_project with the name of your project folder.Here the project name I take eventmanagement.


Step 8: Test the Project

1.  Test all features to ensure they are working correctly.


You're All Set!

Your PHP project should now be running successfully on your local computer.

 


Post a Comment

0Comments

Post a Comment (0)