This repository contains a PHP-based Employee Management System that allows you to perform CRUD (Create, Read, Update, Delete) operations on employees. The system includes input field validations, front-end validation using JavaScript, and user authentication to control access.
- CRUD operations for employees
- Input field validations with appropriate warning messages
- Front-end validation using JavaScript
- User authentication to control access
Before you begin, ensure you have the following installed:
- XAMPP: A development environment containing Apache, MySQL, PHP, and Perl.
-
Install XAMPP by following the instructions on their website.
-
Clone this repository to your local machine using:
git clone https://github.com/sammanamgain/Employee-management-using-php.git
Move the cloned repository files to the lab folder inside the htdocs directory of your XAMPP installation. The directory structure should look like:
-
dashboard
img
lab
tuts
webalizer
xampp
applications
Chrome HTML Document
bitnami.css
favicon
index.php
Start the Apache and MySQL services from the XAMPP control panel.
Import the database schema into your MySQL database:
create a database called company
inside company create two table :
1)companydetails
2)employee
companydetaisl schema looks like this
employee schema looks like this
also create users database and create a table user and schema looks like this
Open xampp admin panel , start the apache server and move to the admin panel and also start the MySQL server and click on admin panel
Create a new database named employee_management_db.
Inside the newly created database, import the database.sql file from the repository's root directory.
click the admin panel menu from xampp and you will be redirected to home page
You'll be prompted to log in.
Login page looks like this.
First create a userid , use signup button
and after this you will be redirected to login page and use username and password to navigate to home folder
Username:
Password:
Once logged in, you can perform CRUD operations on employees and company . The input fields are validated both on the front-end using JavaScript and on the back-end using PHP.
company information UI looks like this
Contributions are welcome! If you find any issues or improvements, feel free to create a pull request.