Skip to content

A web-based Employee Management System built with PHP and MySQL. It allows an administrator to manage the complete employee lifecycle, featuring a filterable dashboard, CRUD operations, termination/resignation workflows, and a custom auto-generated ID system for each employee.

Notifications You must be signed in to change notification settings

NothingADSR123/EmployeeManagementPHP

Repository files navigation

Employee Management System in PHP & MySQL

A comprehensive, web-based application for managing employee records within a company.
This system allows an administrator to handle the complete employee lifecycle — from adding new hires to managing their departure through termination or a structured resignation workflow.


📖 Project Description

The Employee Management System (EMS) is a practical project built using Core PHP and MySQL to serve as a central hub for employee information. It features a dynamic dashboard where administrators can view, filter, and manage personnel.

The standout feature is the custom auto-generated Employee ID (e.g., sz2025IT001), created based on:

  • Company Prefix
  • Joining Year
  • Department

This structured ID provides a scalable and informative way to identify employees.

The system is designed to be a learning tool for understanding fundamental web development concepts like:

  • CRUD operations
  • Database management
  • Implementing business logic in a web application

✨ Features

  • Admin Dashboard: Centralized view of all employees with status indicators.
  • Status Filtering: Filter employees by status — Active, Resigned, Terminated, Resignation Pending.
  • Add Employee: Dedicated form to add new employees with auto-generated IDs.
  • Custom Auto-ID Generation: Automatically creates a unique, structured Employee ID.
  • Edit Employee: Update details of existing employees.
  • Termination Management: Directly terminate active employees.
  • Resignation Workflow: Multi-step resignation process:
    1. Admin initiates resignation request.
    2. Status changes to Resignation Pending.
    3. Admin approves/rejects request, completing the workflow.

🛠 Technology Stack

  • Frontend: HTML, CSS
  • Backend: Core PHP
  • Database: MySQL
  • Server: XAMPP / WAMP

🚀 Getting Started

Follow these steps to set up and run the project locally.

✅ Prerequisites

  • Install XAMPP or any local server environment that supports PHP & MySQL.

📌 Installation and Setup

  1. Clone the Repository

    # Navigate to your htdocs folder
    cd C:/xampp/htdocs
    
    # Clone the repository
    git clone https://github.com/your-username/employee-management-system.git
    
    # Navigate into the project folder
    cd employee-management-system
  2. Start Your Local Server

    • Open the XAMPP Control Panel.
    • Start Apache and MySQL.
  3. Create and Set Up the Database

    • Open phpMyAdmin.
    • Click New → Create a new database named ems_db.
    • Go to the Import tab.
    • Choose the database.sql file from the project.
    • Click Go to import tables and sample data.
  4. Configure Database Connection
    Edit config.php if needed:

    // config.php
    $servername = "localhost";
    $username   = "root";
    $password   = "";
    $dbname     = "ems_db";

    (Update username/password if your MySQL setup differs.)

  5. Run the Application
    Open your browser and visit:

    http://localhost/employee-management-system/
    

    You should now see the Employee Management Dashboard.


📂 File Structure

employee-management-system/
│
├── index.php                 # Main dashboard with employee list & filters
├── config.php                # Database connection file
├── add_employee.php          # Form to add new employees
├── add_employee_process.php  # Backend script for adding employees + ID generation
├── edit_employee.php         # Form to edit employee details
├── update_employee_process.php # Updates employee records
├── terminate_employee.php    # Handles termination process
├── resign_request.php        # Initiates resignation process
├── resign_process.php        # Approves/Rejects resignation requests
├── database.sql              # Database schema + sample data
└── assets/                   # (Optional) CSS, JS, Images

📌 Notes

  • Default database credentials:

    • User: root
    • Password: (blank)
  • You can customize the employee ID format inside add_employee_process.php.


📜 License

This project is open-source and available for learning & development purposes.
You may use, modify, and distribute it with proper attribution.


About

A web-based Employee Management System built with PHP and MySQL. It allows an administrator to manage the complete employee lifecycle, featuring a filterable dashboard, CRUD operations, termination/resignation workflows, and a custom auto-generated ID system for each employee.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages