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.
- Apache server.
- PHP + JavaScript programming Language.
- Html + Css.
- font awesome library.
- MySQL Database.
If an enrollment already has a mark, the 'Set Mark' button will be disabled.
- MySQL Database.
1 - Login Page
this form allow users and admin to login into the system.
If you enter an invalid email or password, an error message will be displayed, alerting you to the incorrect login credentials.
if you enter the correct email and password, you will be redirected to the Dashboard page.
2 - 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.
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.
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)?>).
3 - 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.
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.
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.
Remove Student.
Like for the edit, click the 'Delete' button to remove a student.
Search Students.
To search for students, you can utilize the search bar.
Users can search by gender, a specific value, or both.
female students |
male 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.
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
4 - 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.
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.
If 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.
Remove Course.
Like for the edit, click the 'Delete' button to remove a course.
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.
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.
5 - 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.
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.
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.
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.
Remove Enrollement.
Like for the edit, click the 'Delete' button to remove an enrollment.
Add Enrollement Mark.
To set a mark for an enrollment, click on the 'Set Mark' button in the table.
Search Enrollement.
To search for enrollments, you can utilize the search bar.
Users can search by status (acive, inactive), a specific value, or both.
6 - 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.
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
Remove Mark.
To remove a mark, simply click the 'Delete' button in the table next to the mark you wish to remove.
Search Mark.
You can search by status (pass or fail) or by a specific value.
8 - 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.
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.
Administrators cannot add or edit a user email address with one that 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.
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.
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.
2 comments
commentsOne of the worst and most time-wasting websites I’ve come across. I visited looking for source code and spent a lot of time, but found nothing useful. It seems like a tactic just to gain views and clicks. Please avoid visiting this site.
ReplySend me code source
Reply