Create School Management System with PHP & MySQL

Published on:

School Management System (SMS) is a web application commonly used in schools to manage teachers, students, classes, subjects, sections, student attendance, etc.

So if you are a PHP developer and want to develop School Management System with PHP, you are here at the right place. This tutorial will teach how to develop a School Management System with PHP and MySQL.

We will cover this tutorial in easy steps, from developing a live demo of the school management system to covering major functionalities like managing teachers, students, classes, subjects, sections, student attendance, etc. This is a straightforward school management system for learning purposes and can be enhanced according to the requirement to develop a perfect advanced level system. The download link is at the end of the tutorial to download the complete project with database tables.

Read Also: How to Create a Histogram in Excel (Step-by-Step Guide)

About School Management System

School Management Systems manage all the information of the students and/or faculty in a particular school.

In our project, we will only use it to manage some basic personal information of the students of a school.

So let us start implementing School Management System with PHP and MySQL. Before we begin, take a look at the files structure for this example.

Read Also: Uses Of Function Keys [F1-F12] In Windows | The Time-Saving Function Key Shortcuts you need to know

Features of School Management System with PHP & MySQL

  • Multi Login
  • Student Management
  • Teacher Management
  • Attendance Management
  • Salary Management
  • Payment Management
  • Timetable Management
  • Exam Management
  • Petty Cash Management
  • Event Management
  • Notification Management
  • Online Chat
  • Classroom Management
  • Grade Management
  • Subject Management
  • Invoice Management

Requirements

• PHP 5.5
• MYSQL 4.6
• Text Editor Software

Create MySQL Database Table

First, we will use MySQL database tables for all the features of our project like admin, chat, classroom, events, exam, grade, group message, parents, payment notifications, student etc. The table structure and data are available in the project download zip file.

Connection with Database

You can change or update the Database settings in config.php file located in controller folder

$servername = "localhost";
$username   = "Enter Database Username";
$password   = "Exter Database Password";
$dbname     = "Enter Database Name";

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);

// Check connection
if (!$conn) {
	
die("Connection failed: " . mysqli_connect_error());

}

Don’t forget to change username, password and dbname (database name).

Create User Login form

In the index.php file, we will create a login form to implement an admin login to allow access to the logged-in user only.

  	<div class="modal fade" id="loginFrom" tabindex="-1" role="dialog" aria-labelledby="loginFrom" aria-hidden="true">
    	<div class="modal-dialog">    
        	<div class="modal-content ">
        		<div class="modal-header bg-aqua-gradient">
          			<h4>User Login...!</h4>
        		</div>
        		<div class="modal-body bgColorWhite">
        			<form role="form" action="../index.php" method="post">                    
                  		<div class="box-body">
                    		<div class="form-group" id="divEmail">
                      			<label for="">Email</label>
                      			<input type="text" class="form-control" id="email" placeholder="Enter email address" name="email" autocomplete="off">
                    		</div>
                            <div class="form-group" id="divPassword">
                      			<label for="">Password</label>
                      			<input type="password" class="form-control" id="password" placeholder="Enter password" name="password" autocomplete="off">
                    		</div>
                  		</div><!-- /.box-body -->
                  		<div class="box-footer">
                  			<input type="hidden" name="do" value="user_login" />
                    		<button type="submit" class="btn btn-info" id="btnSubmit">Submit</button>
                  		</div>
                	</form>
        		</div>
      		</div>      
		</div>
	</div><!--/.Modal--> 

We will implement user login on the login form by calling the method Login() in login.php

function login(){
//document.ready(function{	
	
	$('#loginFrom').modal({
		backdrop: 'static',
		keyboard: false
	});
	$('#loginFrom').modal('show');
};

$("form").submit(function (e) {
//MSK-000098-form submit	

	var uname = $('#email').val();
	var password = $('#password').val();
	
	if(uname == ''){
		//MSK-00099-name
		$("#btnSubmit").attr("disabled", true);
		$('#divEmail').addClass('has-error has-feedback');	
		$('#divEmail').append('<span id="spanEmail" class="glyphicon glyphicon-remove form-control-feedback msk-set-color-tooltip" data-toggle="tooltip"    title="The user name is required" ></span>');	
			
		$("#email").keydown(function() {
			//MSK-00100-name
			$("#btnSubmit").attr("disabled", false);	
			$('#divEmail').removeClass('has-error has-feedback');
			$('#spanEmail').remove();
			
		});	
		
	}
	
	if(password == ''){
		//MSK-00099-name
		$("#btnSubmit").attr("disabled", true);
		$('#divPassword').addClass('has-error has-feedback');	
		$('#divPassword').append('<span id="spanPassword" class="glyphicon glyphicon-remove form-control-feedback msk-set-color-tooltip" data-toggle="tooltip"    title="The password is required" ></span>');	
			
		$("#password").keydown(function() {
			//MSK-00100-name
			$("#btnSubmit").attr("disabled", false);	
			$('#divPassword').removeClass('has-error has-feedback');
			$('#spanPassword').remove();
			
		});	
		
	}
	
	
	if(uname == '' || password == ''){
		//MSK-000098- form validation failed
		$("#btnSubmit").attr("disabled", true);
		e.preventDefault();
		return false;
			
	}else{
		$("#btnSubmit").attr("disabled", false);
		
	}


});

Manage Different Users (multi login setup)

School Management System supports different type of users login like

  • Admin User
  • Teacher User
  • Student User
  • Parent User

You can find the code for all user in the /view folder.

File Structure of Different Users

File Structure for Admin User – Click here to expand

Dashboard

  1. view/dashboard.php
  2. view/all_events1.php.
  3. view/show_events1.php

My Profile

  1. view/admin_profile.php
  2. model/get_admin_profile.php
  3. view/my_profile_update_form.php
  4. model/update_admin_profile.com

Classroom

  1. view/class_room.php
  2. view/show_classroom_table.php
  3. model/add_classroom.php
  4. model/get_classroom.php
  5. model/update_classroom.php
  6. model/delete_record.php

Grade

  1. view/grade.php
  2. view/show_grade_table.php
  3. view/emarks_range_grade_update_form.php
  4. view/range_garde_text.php
  5. model/add_grade.php
  6. model/get_grade.php
  7. model/update_grade.php
  8. model/add_emarks_range_grade.php
  9. model/delete_grade.php
  10. model/update_emarks_range_grade.php
  11. model/delete_range_grade.php

Subject

  1. view/subject.php
  2. view/show_subject_table.php
  3. model/add_subject.php
  4. model/get_subject.php
  5. model/update_subject.php
  6. model/delete_record.php

Teacher

Add Teacher

  1. view/teacher.php
  2. model/add_teacher.php

All Teacher

  1. view/all_teacher.php
  2. view/show_teacher_table.php
  3. model/get_teacher.php
  4. model/update_teacher.php
  5. view/ teacher_salary_details.php
  6. view/ teacher_salary_details2.php
  7. view/ teacher_salary_details3.php
  8. view/ add_teacher_salary.php
  9. view/ teacher_salary_invoice.php
  10. view/teacher_salary_invoice1.php
  11. view/ teacher_salary_history1.php
  12. model/delete_record.php

Subject Routing

  1. view/subject_routing.php
  2. view/show_subject_routing_table.php
  3. view/ subject_fee_text.php
  4. model/add_subject_routing.php
  5. model/get_subject_routing.php
  6. model/update_subject_routing.php
  7. model/update_subject_fee.php

Timetable

  1. view/timetable.php
  2. view/ timetable_grade_wise.php
  3. view/timetable_insert_form.php
  4. view/ timetable_update_form.php
  5. model/get_teacher_timetable.php
  6. model/get_timetable.php
  7. model/add_timetable.php
  8. model/delete_record.php

Student

Add Student

  1. view/student.php
  2. view/show_student_subject.php
  3. view/student_first_payment.php
  4. model/add_student.php
  5. model/add_student_ first _payment.php

All Student

  1. view/all_student.php
  2. view/student_grade_wise.php
  3. model/get_student.php
  4. model/ leave_student.php
  5. model/delete_student_grade_subject.php
  6. view/show_student_grade_subject.php
  7. view/ student_first_payment.php
  8. model/add_student_first_payment.php
  9. view/show_student_subject1.php
  10. model/add_student_subject.php
  11. view/student_exam_mark_subject_table.php
  12. view/student_exam_mark_insert_form.php
  13. view/student_exam_mark_subject_view_table.php
  14. view/student_exam_mark_view_form.php
  15. view/exam_mark_text.php
  16. model/update_student_exam_mark.php
  17. view/student_payment_details.php
  18. view/student_payment_details2.php
  19. view/student_payment_invoice.php
  20. view/student_payment_history.php
  21. view/student_payment_details3.php
  22. view/student_payment_invoice1.php

Student Payment

  1. view/student_payment.php
  2. view/student_payment_details.php
  3. view/student_payment_details4.php
  4. model/student_payment_invoice.php
  5. modal/add_student_payment.php

Attendance

Add Attenddance

  1. view/add_attendance.php
  2. model/add_attendance.php
  3. model/add_payment_notifications.php

Student Attendance History

  1. view/student_attendance_history.php
  2. view/student_attendance_history1.php
  3. view/show_student2.php
  4. view/student_profile.php

Teacher Attendance History

  1. view/teacher_attendance_history.php
  2. view/teacher_attendance_history1.php
  3. view/show_teacher2.php
  4. view/teacher_profile.php

Exam

Create Exam

  1. view/exam.php
  2. model/get_exam.php
  3. model/update_exam.php
  4. view/show_exam_table.php
  5. model/delete_record.php
  6. model/add_exam.php

Exam Timetable

  1. view/exam_timetable.php
  2. view/exam_timetable_grade_wise.php
  3. view/exam_timetable_insert_form.php
  4. view/exam_timetable_update_form.php
  5. model/get_exam_timetable.php
  6. model/delete_record.php
  7. model/add_exam_timetable.php
  8. model/update_exam_timetable.php

Student Exam Marks

  1. view/student_exam_marks.php
  2. view/show_student.php
  3. view/student_profile.php
  4. view/student_exam_mark_insert_form1.php
  5. view/student_exam_mark_update_form.php
  6. view/my_student_exam_marks1.php
  7. model/add_student_exam_mark1.php
  8. model/update_student_exam_mark2.ph

Student Exam Marks History

  1. view/student_exam_marks_history.php
  2. view/show_student1.php
  3. view/student_profile.php
  4. view/my_student_exam_marks1.php

Petty Cash

  1. view/petty_cash.php
  2. model/approve_petty_cash.php
  3. view/petty_cash_details.php
  4. model/add_petty_cash.php

Friends

Add Friends

  1. view/add_friends.php
  2. model/add_friends.php
  3. model/confirm_friends.php
  4. view/friend_profile.php
  5. view/find_friends.php

My Friends

  1. view/my_friends.php
  2. view/friend_profile.php
  3. view/conversation_history_admin.php
  4. model/add_message.php
  5. view/conversation_history_admin1.php
  6. model/confirm_msg_read.php
  7. view/unread_msg.php

Event

My Events

  1. view/my_events.php
  2. view/event1.php
  3. view/show_events.php
  4. view/create_events.php
  5. model/get_events.php
  6. model/delete_record1.php
  7. model/add_events.php

All Events

  1. view/all_events.php
  2. view/all_events1.php
  3. view/show_events1.php
  4. model/get_events.php
File Structure for Teacher User – Click here to expand

Dashboard

  1. view/dashboard2.php
  2. view/all_events1.php
  3. view/show_events1.php

My Profile

  1. view/teacher_profile2.php
  2. model/get_teacher_profile.php
  3. view/my_profile_update_form2.php
  4. model/ update_teacher_profile.php

My Student

  1. view/my_student.php
  2. view/student_grade_wise2.php
  3. model/get_student.php
  4. model/leave_student.php
  5. model/delete_student_grade_subject.php
  6. view/show_student_grade_subject.php
  7. view/student_first_payment.php
  8. model/add_student_first_payment.php
  9. model/get_student_subject.php
  10. view/show_student_subject1.php
  11. model/add_student_subject.php
  12. view/student_exam_mark_subject_table.php
  13. view/student_exam_mark_insert_form.php
  14. view/student_exam_mark_subject_view_table.php
  15. view/student_exam_mark_view_form.php
  16. view/exam_mark_text.php
  17. model/update_student_exam_mark.php

Subject

My Subject

  1. view/my_subject2.php

All Subject

  1. view/all_subject2.php

Timetable

My Timetable

  1. view/my_timetable2.php
  2. model/get_subject_timetable.php
  3. view/timetable_insert_form2.php
  4. view/timetable_update_form2.php
  5. model/get_timetable.php
  6. model/delete_record.php
  7. model/add_timetable.php
  8. model/update_timetable.php

All Timetable

  1. view/all_timetable2.php
  2. view/timetable_grade_wise2.php

Attendance

My Attendance

  1. view/my_attendance2.php

My Attendance History

  1. view/my_attendance_history2.php
  2. view/my_attendance_history3.php

My Salary

  1. view/my_salary.php
  2. view/teacher_salary_details3.php
  3. view/teacher_salary_invoice1.php

My Petty Cash

  1. view/my_petty_cash.php
  2. view/petty_cash_details.php
  3. model/add_petty_cash.php

Exam

My Student Exam Marks

  1. view/my_student_exam_marks.php
  2. view/show_my_student.php
  3. view/student_profile.php
  4. view/my_student_exam_mark_insert_form.php
  5. view/my_student_exam_mark_update_form.php
  6. view/my_student_exam_marks1.php
  7. model/add_student_exam_mark.php
  8. model/update_student_exam_mark.php

My Student Exam Marks History

  1. view/my_student_exam_marks_history.php
  2. view/student_profile.php
  3. view/my_student_exam_marks1.php
  4. view/show_my_student1.php

Exam Timetable

  1. view/exam_timetable2.php
  2. view/exam_timetable_grade_wise.php
  3. view/exam_timetable_insert_form2.php
  4. view/exam_timetable_update_form2.php
  5. model/get_exam_timetable.php
  6. model/delete_record.php

Friends

Add Friends

  1. view/add_friends2.php
  2. view/friend_profile.php
  3. view/find_friends.php
  4. model/add_friends.php
  5. model/confirm_friends.php

My Friends

  1. view/my_friends2.php
  2. view/friend_profile.php
  3. view/conversation_history_teacher.php
  4. model/add_message.php
  5. view/conversation_history_teacher1.php
  6. model/confirm_msg_read.php
  7. view/unread_msg.php

Events

My Events

  1. view/my_events2.php
  2. view/event1.php
  3. view/show_events.php
  4. view/create_events.php
  5. model/get_events.php
  6. model/delete_record1.php
  7. model/add_events.php

All Events

  1. view/all_events2.php
  2. view/all_events1.php
  3. view/show_events1.php
  4. model/get_events.php
File Structure for Student User – Click here to expand

Dashboard

  1. view/dashboard1.php
  2. view/all_events1.php
  3. view/show_events1.php

My Profile

  1. view/my_profile.php
  2. model/get_student_profile.php
  3. view/my_profile_update_form1.php
  4. model/update_student_profile.php

Teacher

My Teacher

  1. view/my_teacher.php
  2. view/teacher_profile1.php

All Teacher

  1. view/all_teacher1.php
  2. view/teacher_profile1.php

Subject

My Subject

  1. view/my_subject.php

All Subject

  1. view/all_subject1.php

Timetable

My Timetable

  1. view/my_timetable.php

All Timetable

  1. view/all_timetable1.php

Attendance

My Attendance

  1. view/my_attendance.php

My Attendance History

  1. view/my_attendance_history.php
  2. view/my_attendance_history1.php

My Payments

  1. view/my_payments.php
  2. view/student_payment_details3.php
  3. view/student_payment_invoice1.php

Exam

My Exam Marks

  1. view/my_exam_marks.php
  2. view/my_exam_marks1.php

My Exam Marks History

  1. view/my_exam_marks_history.php
  2. view/my_exam_marks1.php

My Exam Timetable

  1. view/my_exam_timetable.php
  2. view/ my_exam_timetable1.php

Friends

Add Friends

  1. view/add_friends1.php
  2. view/friend_profile.php
  3. view/find_friends.php
  4. model/add_friends.php
  5. model/confirm_friends.php

My Friends

  1. view/my_friends1.php
  2. view/friend_profile.php
  3. view/conversation_history_student.php
  4. model/add_message.php
  5. view/conversation_history_student1.php
  6. model/confirm_msg_read.php
  7. view/unread_msg.php
File Structure for Parent User – Click here to expand

Dashboard

  1. view/dashboard3.php
  2. view/all_events1.php
  3. view/show_events1.php

Profile

My Profile

  1. view/parents_profile.php
  2. model/get_parents_profile.php
  3. view/my_profile_update_form3.php
  4. model/update_parents_profile.php

My Son’s Profile

  1. view/my_sons_profile.php

Teacher

My Son’s Teacher

  1. view/my_sons_teacher.php
  2. view/teacher_profile1.php

All Teacher

  1. view/all_teacher3.php
  2. view/teacher_profile1.php

Subject

My Son’s Subject

  1. view/my_sons_subject.php

All Subject

  1. view/all_subject3.php

Timetable

My Son’s Timetable

  1. view/my_sons_timetable.php

All Timetable

  1. view/all_timetable3.php

Attendance

My Son’s Attendance

  1. view/my_sons_attendance.php

My Son’s Attendance History

  1. view/my_sons_attendance_history.php
  2. view/my_sons_attendance_history1.php

My Son’s Payments

  1. view/my_sons_payments.php
  2. view/student_payment_details3.php
  3. view/student_payment_invoice1.php

Exam

My Son’s Exam Marks

  1. view/my_sons_exam_marks.php
  2. view/my_exam_marks1.php

My Son’s Exam Marks History

  1. view/my_sons_exam_marks_history.php
  2. view/my_exam_marks1.php

My Son’s Exam Timetable

  1. view/my_sons_exam_timetable.php
  2. view/ my_exam_timetable1.php
File Structure for Different Alerts – Click here to expand

Classroom

Insert

  1. classroom_Duplicated
  2. insert_Success
  3. connection_Problem

Update

  1. update_Success
  2. connection_Problem
  3. update_error1
  4. classroom_Duplicated

Delete

  1. delete_Success
  2. connection_Problem

Grade

Insert

  1. grade_Duplicated
  2. insert_Success
  3. connection_Problem

Update

  1. update_Success
  2. connection_Problem
  3. update_error1
  4. grade_Duplicated

Delete

  1. delete_Success
  2. connection_Problem

Subject

Insert

  1. subject_Duplicated
  2. insert_Success
  3. connection_Problem

Update

  1. update_Success
  2. connection_Problem
  3. update_error1
  4. subject_Duplicated

Delete

  1. delete_Success
  2. connection_Problem

Subject Routing

Insert

  1. duplicate_Record1
  2. insert_Success
  3. connection_Problem

Update

  1. update_Success
  2. connection_Problem
  3. update_error1
  4. duplicate_Record1

Delete

  1. delete_Success
  2. connection_Problem

Teacher

Insert

  1. index_Duplicated
  2. insert_Success
  3. connection_Problem
  4. index_email_Duplicated
  5. email_Duplicated
  6. upload_error1

Update

  1. update_Success
  2. connection_Problem
  3. upload_error1
  4. update_error1
  5. email_Duplicated

Delete

  1. delete_Success
  2. connection_Problem

Student

Insert

  1. index_Duplicated
  2. insert_Success
  3. connection_Problem
  4. index_email_Duplicated
  5. email_Duplicated
  6. upload_error1

All Student Update

  1. update_Success
  2. connection_Problem
  3. upload_error1
  4. update_error1
  5. email_Duplicated

Delete

  1. delete_Success
  2. connection_Problem

Timetable

Insert

  1. duplicate_Record2
  2. insert_Success
  3. connection_Problem

Update

  1. update_Success
  2. connection_Problem
  3. update_error1
  4. duplicate_Record2

Delete

  1. delete_Success
  2. connection_Problem
Other Files – Click here to expand
  1. view/head.php
  2. view/header_admin.php
  3. view/header_student.php
  4. view/header_teacher.php
  5. view/header_parents.php
    • view/all_student_due_payment.php
    • view/student_due_payment.php
    • view/show_friend_request.php
    • view/friend_profile.php
    • view/student_profile1.php
    • model/confirm_friends.php
    • view/unread_msg.php
    • model/confirm_notifications_read.php
    • model/confirm_msg_read.php
    • model/delete_friend_request.php
  6. view/sidebar.php
  7. view/sidebar1.php
  8. view/sidebar2.php
  9. view/footer.php
  10. view/alert.php
  11. controler/config.php
  12. view/login.php

Output of School Management System with PHP & MySQL

Login Page (Index)

Main Page

Admin View

Admin View

Teacher View

Teacher View

Student View

student view

Parent View

Parent View
Download source code of School Management System with PHP & MySQL project: School Management System with PHP & MySQL

School Management System Project Demo

Login Details for Demo Purpose only. Please note: Demo users, you are not able to change the details


Admin User
Username: [email protected]
Password: 12345

Parent User
Username: [email protected]
Password: 12345

Teacher User
Username: [email protected]
Password: 12345

Student User
Username: [email protected]
Password: 12345

Summary

We have successfully developed the Create School Management System with PHP & MySQL Project. We learn different features of School Management System like Student Management, Teacher Management, Attendance Management, Salary Management, Timetable Management, Exam Management and many more..

In this way we successfully made a School Management System with PHP & MySQL. I hope you enjoyed building School Management System with PHP & MySQL.

Other Useful Projects
1. Create School Management System in Python, Download Source Code
2. Create Notepad using Java, Download Source Code
3. Create Calculator Program in Python, Download Source Code
4. Create Fruit Ninja Game in Python, Download Source Code

Search Keywords

  • School Management System using PHP, MySQL with Source Code
  • Download School Management System for Free
  • Free School Management System Project using PHP and MySQL
Related Articles

Related

2 Comments

Leave a Reply

Please enter your comment!
Please enter your name here