PHP Students Management System Source Code

Students Management System In PHP With Source Code

Students Management System In PHP With Source Code


in this php project demo, we will discover the capabilities of a Students Management System.
This project is built using PHP and JavaScript programming languages, along with a MySQL database.
this students system allow users to manage students, courses, enrollments and marks.

Tools:
- Apache server.
- PHP + JavaScript programming Language.
- Html + Css.
- font awesome library.
- MySQL Database.




1 - Login Page

Students Management System In PHP - Login Page

this form allow users and admin to login into the system.

login form


If you enter an invalid email or password, an error message will be displayed, alerting you to the incorrect login credentials.

login form - incorrect password

login form - incorrect email


if you enter the correct email and password, you will be redirected to the Dashboard page.

2 - Dashboard Page


Students Management System In PHP - Dashboard Page


the dashboard page contains the following sections:
1 - SideBar Menu: The page, along with other pages, features a sidebar menu section. 
This menu is included from the "common-section.php" file using a PHP include statement. 
This menu include a logout button so users can quit the application.
The visibility of the "Users" link depends on the user's role. 
If the user is an admin, the link is visible; otherwise, it is hidden.

SideBar Menu For Admins
Admin


if the user type is an admin the link to manage users will be visible, and if it's not an admin it will be invisible.

SideBar Menu For Users
User


2 - Analytics Boxes: The page showcases a set of boxes that provide essential analytics information. Each box represents a different metric and consists of an icon, a title, and a corresponding value.

The values displayed in these boxes are retrieved from PHP variables and dynamically populated using PHP code (e.g., <?= count($students)?>).


Analytics Boxes



3 - Students Page

Students Management System In PHP - Students Page

This Student Dashboard provides a view of student demographics, including name, birthdate, gender, contact information, and more.

The dashboard offers insights into the gender distribution among enrolled students, allowing administrators to analyze gender diversity within the student body.

Student Dashboard 1
Student Dashboard 2


Add Student.

To add a new student, click on the 'Add New Student' button. 
A modal will appear to collect the student's information. 
If the insertion is successful, a message will appear to notify the user using PHP cookies.

Add New Student

Student Added



Edit Student.

To edit a student, click the edit button in the table corresponding to the student you want to edit. 
A modal will appear to collect the new student's information. 
If the update is successful, a message will appear to notify the user using PHP cookies.

Edit Student

Student Edited


Remove Student.

Like for the edit, click the 'Delete' button to remove a student.

Remove Student

Student Removed



Search Students.

To search for students, you can utilize the search bar. 
Users can search by gender, a specific value, or both.

Search For Female Students
female students

Search For Male Students
male students

Search Students
Search Students ('ha' query)



Student Enrolled In:

To view the courses a specific student is enrolled in, click on the 'view' link in the table. 
The courses will be displayed in a table below the student's information. 
The table shows the courses and the student's mark on them if available; if not, a button to set the mark will be displayed.

Student Courses


Set Student Mark.

To set a student's mark for a course, click on the 'Set Mark' button in the table. 
A modal will appear, allowing you to enter the student's mark, status (Pass or Fail), and a remark. 
If a student already has a mark for the course, the 'Set Mark' button will not be visible


Set Student Mark

Student Mark Added

Student Courses With Marks


4 - Courses Page

Students Management System In PHP - Courses Page

This Course Dashboard displays a table with information about each course, including ID, name, description, duration, instructor, level, fee, and actions (such as editing or deleting).
Users can add new courses, edit existing courses, and remove courses using modal forms.


Course Dashboard 1
Course Dashboard 2


Add Course.

To add a new course, click on the 'Add New Course' button. 
A modal will appear to collect the course's information. 
If the insertion is successful, a message will appear to notify the user using PHP cookies.

Add New Course

Add New Course 2

Course Added


If course name already exists.

course name already exists


Edit Course.

To edit a course, click the edit button in the table corresponding to the course you want to edit. 
A modal will appear to collect the new course's information. 
If the update is successful, a message will appear to notify the user using PHP cookies.

Edit Course

Course Edited


Remove Course.

Like for the edit, click the 'Delete' button to remove a course.

Remove Course

Course Removed


Search Courses.

To search for courses, you can utilize the search bar. 
Users can search by level (beginner, intermediate, advanced), a specific value, or both.


Search Courses 1

Search Courses 2

Search Courses 3

Search Courses 4

View Students Enrolled In Selected Course:

To view the students enrolled in a specific course, click on the 'view' link in the table. 
The students will be displayed in a table below the course information. 
The table shows the students and their marks on this course, if available; if not, a button to set the mark will be displayed.

students enrolled in a course

courses - add mark

courses - add mark 2

 

5 - Enrollments Page

Students Management System In PHP - Enrollments Page


This Enrollments Dashboard displays a table with information about each enrollment, including enrollment ID, student name, course name, enrollment date, enrollment status, and action buttons for editing, deleting, and marking.
Users can add new enrollments, edit existing enrollments, and remove enrollments using modal forms.
It displays total enrollments, active enrollments, and inactive enrollments in separate cards.


Enrollments Dashboard 1
Enrollments Dashboard 2



Add Enrollment.

To add a new course, click on the 'Add New Enrollment' button. 
A modal will appear to collect the enrollment's information. 
If the insertion is successful, a message will appear to notify the user using PHP cookies.

Add Enrollment

Enrollment Added


Enrollement Already Exists:

Before adding a new enrollment, we will verify that an active enrollment for the same student and course does not already exist in the records.

Enrollement Already Exists



Edit Enrollement.

To edit a enrollment, click the edit button in the table corresponding to the enrollment you want to edit. 
A modal will appear to collect the new enrollment's information. 
If the update is successful, a message will appear to notify the user using PHP cookies.

Edit Enrollement

Enrollement Edited


Remove Enrollement.

Like for the edit, click the 'Delete' button to remove an enrollment.

Remove Enrollement

Enrollement Removed


Add Enrollement Mark.

To set a mark for an enrollment, click on the 'Set Mark' button in the table.

Add Enrollement Mark

Add Enrollement Mark 2

If an enrollment already has a mark, the 'Set Mark' button will be disabled.

Enrollements



Search Enrollement.

To search for enrollments, you can utilize the search bar. 
Users can search by status (acive, inactive), a specific value, or both.

Search Enrollement

Search Enrollement 2

Search Enrollement 3


6 - Marks Page

Students Management System In PHP - Marks Page


This Marks Dashboard displays a table with information about each Mark.
Users can edit existing marks, and remove marks using modal forms.
It also display statistics such as the highest mark, lowest mark, and average mark based on the retrieved marks data.
To add a mark you can use the Student, Course, Enrollment Dashboard.

Marks Dashboard


Edit Mark.

To edit a mark, click the edit button in the table corresponding to the mark you want to edit. 
A modal will appear to collect the information for the new mark. 
Users can only edit the mark value, status, and remark; the enrollment ID remains the same

Edit Mark

Mark Edited



Remove Mark.

To remove a mark, simply click the 'Delete' button in the table next to the mark you wish to remove.

Remove Mark

Mark Removed



Search Mark.

You can search by status (pass or fail) or by a specific value.

Search Mark - fail
fail

Search Mark - pass
pass

Search Mark - query
query "ha"


8 - Users Page

Students Management System In PHP - Users Page


Users are redirected to this page only if they are logged in as an administrator (admin role).
All users stored in the database are retrieved and displayed in a table format.


Users Dashboard



Add User:

Administrators can add new users by filling out a form. 
They need to provide the user's name, email, phone number, password, confirm password, and user type (admin or user).
When adding or editing a user, the system checks if the entered password and confirm password fields match before submission.

Add User

Add User - passwords do not match

User Added



Administrators cannot add or edit a user email address with one that already exists.

user email address already exists


Edit User:

Existing users can be edited by clicking the "Edit" button next to their details in the table. 
This opens a form with pre-filled fields, allowing administrators to modify the user's information.

Edit User

User Edited


Remove User:

Administrators can remove users by clicking the "Delete" button next to their details in the table. 
A confirmation modal appears before deleting the user.

Remove User

User Removed


Search User:

Users can search for specific users by name and user type (admin or user). 
The search results are displayed dynamically on the page.

Search Users

Search User 2

Search User 3




if you want the source code click on the download button below








Share this

Related Posts

Previous
Next Post »