Student Management System 1
Student Management System 1
A Project Submitted
in Partial Fulfilment of the Requirements
for the Degree of
Bachelor of Computer Application
By
PRIYANSHU KUAMR
Enrollment No: 2206000003012
DHIRAJ KUMAR MISHRA
Enrollment No: 2206000003498
I declare that the work presented in this project titled “STUDENT MANAGEMENT SYSTEM”,
(SVSU), Meerut for the award of the Bachelor of Computer Application degree is my original
work. I have not plagiarized or submitted the same work for the award of any other degree. In
case this undertaking is found incorrect, I accept that my degree may be unconditionally
withdrawn.
May, 2025
Meerut
________________________________
(PRIYANSHU KUAMR )
________________________________
(DHIRAJ KUMAR MISHRA )
CERTIFICATE ISSUED BY DEPARTMENT
This is to certify that the Practical Training Report entitled “STUDENT MANAGEMENT
SYSTEM” submitted to Swami Vivekanand Subharti University, Meerut in partial fulfillment of
the requirement for the award of the degree of “Bachelor of Computer Application” is a
bonafide work carried out by “PRIYANSHU KUAMR and DHIRAJ KUMAR MISHRA for
the required period at Department of Computer Application, K.V. Subharti College of
Science, Swami Vivekanand Subharti University, Meerut.
It is further certified that the work has not been submitted in part or in full to any other
university or institute for the award of any degree or diploma.
Certified that the work contained in the project titled “STUDENT MANAGEMENT SYSTEM”, by
PRIYANSHU KUAMR and DHIRAJ KUMAR MISHRA has been carried out under my
supervision and that this work has not been submitted elsewhere for a degree.
I, PRIYANSHU KUAMR Kumar and DHIRAJ KUMAR MISHRA hereby declare that this
project report entitled “STUDENT MANAGEMENT SYSTEM” is the bonafide work of mine
carried out under the supervision of Mr. Ankit Kumar, Associate Professor of Department of
Computer Application. I declare that, to the best of my knowledge, the work reported here in
does not form part of any other project report or dissertation on the basis of which a degree or
award was conferred on an earlier occasion to any other candidate. The content of this report is
not being presented by any other student to this or any other University for the award of a
degree.
ABSTRACT
real-time weather information with accuracy and efficiency. Developed using HTML, CSS,
JavaScript, and integrated with the OpenWeatherMap API, the application offers a seamless
The system provides a clean and responsive web interface, enabling users to search and view
current weather details for any city. It displays key information such as temperature, weather
conditions, humidity, wind speed, and more. The data is dynamically fetched from the API,
One of the major features includes user input through a search bar, which allows weather
tracking for multiple locations. The intuitive layout and modern UI design make navigation
simple and engaging. Users can view daily forecasts, ensuring better planning and preparedness
The application leverages JavaScript to process and display JSON data from the API in real time,
ensuring a fast and interactive experience. Responsive design ensures usability across various
Overall, the STUDENT MANAGEMENT SYSTEM offers a reliable and interactive platform
that combines simplicity with functionality. It serves as an excellent tool for users seeking timely
and accurate weather updates, showcasing the integration of modern web technologies with real-
In the evolving world of digital innovation, accurate and timely weather information has become
essential for day-to-day life. With the increasing impact of climate change and the growing need
for environmental awareness, weather forecasting plays a crucial role in planning and decision-
making. This project was initiated with the vision to provide a modern, user-friendly, and real-
Inspired by the limitations of traditional weather updates and the potential of web technologies,
weather data to users' fingertips. Our goal was to simplify the process of accessing accurate
As a dedicated developer, I utilized web technologies like HTML, CSS, and JavaScript,
integrated with the OpenWeatherMap API, to build an interactive and reliable forecasting tool.
This application showcases how technology can be effectively used to make daily life more
This preface reflects the passion and effort invested in the project. I sincerely thank everyone
who supported and guided me through this journey. I hope this STUDENT MANAGEMENT
SYSTEM proves to be a helpful and impactful tool for users seeking reliable and instant weather
updates.
Thank you.
PRIYANSHU KUAMR
I take this opportunity to express my sincere gratitude to all those who have supported and
I am deeply thankful to my respected mentor, Mr. Ankit Kumar, whose valuable insights,
continuous encouragement, and constructive feedback have been instrumental in shaping this
project.
I also extend my thanks to Mr. Ankit Kumar for believing in my capabilities and providing me
with the resources and motivation needed to complete the STUDENT MANAGEMENT
SYSTEM successfully.
successful completion of this project. Your support has truly meant a lot.
PRIYANSHU KUAMR
DHIRAJ KUMAR MISHRA
TABLE OF CONTENTS
1. Declaration
2. Synopsis of project
4. Technology overview
5. Project description
6. Snapshots
7. Scope of project
8. Contribution in project
9. Bibliography
SOFTWARE REQUIRMENT SPECIFICATION
1. Introduction
1.1 Purpose:
1.2 Scope :
Registration Module and Account Management: This module will help the
student get registered from anywhere if internet is present .This module will
really simplify the task of on paper registration. Also after successful
registration the user can update information and change their password as
and when required.
Student id
Student password
Student name
Student DOB
Registration date
Student status
Contact no
Qualification
City
Resume
Image
1.4 Technologies :
PHP.
MYSQL
JAVASCRIPT
HTML
CSS
1.5 Overview:
2. OVERALL DESCRIPTION
There are two different users who will be using this product:
Administrator who can view and edit the details of any students.
Students who can view their details as well as they can edit their
details.
2.5 Constraints :
Every user must be comfortable using computer.
All operations are in English so user must have basic knowledge of
English.
3 Specific Requirements :
Brief Description: This use case is used when the administrator wants
to access the website to enable/disable/update the personal details of
the student.
Basic Flow:
The Website prompts the administrator for the user name and
password. The Administrator enters the user name and password.
The Website verifies the password and sets the user‟s authorization.
Alternative Flow:
The administrator enters invalid username and password then
Preconditions:
The Administrator must be logged into the system in order for this
use case to begin
Basic Flow:
o Student id
o First/last name
o Registration date
o status
The System prompts for the student detail from one of the above keys.
The student details are displayed on the screen.
Alternative Flow:
Post conditions:
The student details are displayed on the screen already existing in the
system. The state of the system remains unchanged.
Use Case : Edit student details
Preconditions:
The Administrator must be logged into the system in order for this
use case to begin.
Basic Flow:
The Administrator logs onto the System.
The Administrator can edit following keys:-
o First/last name
o Gender
o DOB
o Contact no
o Qualification
o City
o Email1
o Email2
o Address
o Description
Alternative Flow:
Brief Description: This use case is used when the student register
himself/herself in the database online.
Preconditions:
The Student must accessed the website in order for this use case to
begin.
Basic Flow:
o Student id
o password
o First/last name
o Status
o Gender
o DOB
o Contact no
o Qualification
o City
o Email1
o Email2
o Address
o Description
o Resume
o Image
Alternative Flow:
User ID not unique: if the user id entered is not unique then it will show an error
message.
Post conditions:
The student get registered on the website and to login into that particular
the administrator must enable it.
Brief Description: This use case is used when the student wants to
access the website
Basic Flow:
The website prompts the student for the user name and
password. The Student enters the user name and password.
The website verifies the password and sets the user‟s authorization.
Alternative Flow:
The Student enters invalid username and password then he will
not be allowed to enter the website.
Brief Description: This use case is used when the student wants to
edit the personal details of the himself/herself already existing in the
database.
Preconditions:
The Student must be logged into the system in order for this use
case to begin.
Basic Flow:
o First/last name
o Gender
o DOB
o Contact no
o Qualification
o City
o Email1
o Email2
o Address
o Description
Alternative Flow:
Post conditions:
The student details get updated in the database.
Use Case Report- Edit Student Details Into Database
It will be ensured that the information entered is of the correct format. For
example name cannot contain numbers. In case if incorrect form of
information is added, the user will be asked to fill the information again.
3.4 Conclusion :
This SRS has given all the details of the application need to be built.
DESIGN PHASE
1. Introduction
developer wants the project to do, rather than describing the project itself.
The Design Document will verify that the current design meets all of the
explicit requirements contained in the system model as well as the
implicit requirements desired by the customer.
The SIMS is a system which contain major part which include: student
Detail, Student image and resume.
The user selects one of the available options as an input to the system.
According to the input by the user the system acts and the rest of the
functions are performed accordingly.The administartor can operate on
any student details.But the normal student or users can only access their
details of all the functionalities.
3. Data Design
Hence we can conclude that the design phase of the SIMS give us the
information of all the processes used in the project and their relation.
TECHNOLOGY OVERVIEW
PHP
MySQL
Apache
The Apache HTTP Server is a web server software notable for playing a key role in
the initial growth of the World Wide Web. In 2009 it became the first web server
software to surpass the 100 million web site milestone. Apache is developed and
maintained by an open community of developers under the auspices of the Apache
Software Foundation. Since April 1996 Apache has been the most popular HTTP
server software in use. As of November 2010 Apache served over 59.36% of all
websites and over 66.56% of the first one million busiest websites.
XAMPP
XAMPP is a small and light Apache distribution containing the most common web
development technologies in a single package. Its contents, small size, and portability
make it the ideal tool for students developing and testing applications in PHP and
MySQL. XAMPP is available as a free download in two specific packages: full and lite.
While the full package download provides a wide array of development tools, XAMPP
Lite contains the necessary technologies that meet the Ontario Skills Competition
standards.The light version is a small package containing Apache HTTP Server, PHP,
MySQL, phpMyAdmin, Openssl, and SQLite.
Now that we have run and tested Apache and PHP, the next step is running
MySQL and creating a database and table which will hold information to be used
by our website. In order to start MySQL, navigate to the xampp directory and run
the mysql_start.bat batch file.The XAMPP package contains an application called
phpMyAdmin which allows developers to administer and maintain MySQL
databases.We will be using phpMyAdmin to create a database and table, and enter
test data. Before testing phpMyAdmin, make sure that both Apache and MySQL
are running by opening their respective batch files: apache_start.bat and
mysql_start.bat. Along with Apache and MySQL running in the background, we
type http://localhost/phpMyAdmin/ into our web browser. If successful we will be
presented with a phpMyAdmin start page similar to the one shown below.
phpMyAdmin start page
The first step with phpMyAdmin running is creating a new database.We create a
new database by directly executing SQL statements as shown below.The
successful execution of the sql querry creates a database „student‟ with two tables
in it.The tabels are admin_login and student_information.We also inserted values in
the admin table.The screenshot below shows the successful execution of the query
thus creation of a database named student.
PROJECT DESCRIPTION
Introduction
Header.php : Header file for login page and homepage of the site.
Student_View.php : Page to display student profile with all the details of the
student.
admin_login :
Student_information :
`
o student_id : Stores user id of the student(s)
Features
The Website provides following functionalities to the users :
Administrator :
o Login/Logout
o Search students
Student :
o Login/Logout
o View profile
o Edit profile
o Change password
Source Code
Index.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> <link rel="stylesheet" href="Style.css" type="text/css"/> <title>Home
Page</title>
</head>
<body>
<table width="100%" height="100%" >
<tr height="15%">
<td><?php include 'Header.php';?></td>
</tr>
<tr height="80%">
<td align="center" valign="baseline"><table
width="70%"> <tr height="10%">
<td align="center"><a href="index.php" class="stylelink" style="text-
decoration:none">Home</a></td>
<td align="right"><a href="Student_login.php" class="stylelink"
style="text-decoration:none">Student Login</a>
<a href="Admin_login.php" class="stylelink" style="text-
decoration:none">Administrator
Login</a></td> </tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr height="5%">
<td><?php include 'Footer.php';?></td>
</tr>
</table>
</body>
</html>
Student_login.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> <title>Login Page</title>
<link rel="stylesheet" href="Style.css"
type="text/css"/> <script type="text/javascript">
function validate()
{
if(document.form1.st_id.value=="")
{
alert("Please enter your login Id.");
document.form1.st_id.focus();
return false;
}
if(document.form1.st_pass.value=="")
{
alert("Please enter your password.");
document.form1.st_pass.focus();
return false;
}
}
</script>
</head>
<body onLoad="javascript:document.form1.st_id.focus()">
<form name="form1" method="post" action="Student_login_handler.php"
onSubmit="return validate();">
<table width="100%" height="100%" >
<tr>
<td height="15%"><?php include
'Header.php';?></td> </tr>
<tr>
<td width="100%" height="80%" align="center"
valign="baseline"><table width="90%" >
<tr>
<td width="8%"><a href="index.php" class="stylelink"
style="text-decoration:none; font-family: "Times New
Roman", Times, serif;">Home</a></td>
<td width="35%" align="center"> </td>
<td width="27%"> </td>
<td width="30%" align="right"><a href="Student_Registration.php"
class="stylelink" style="text-decoration:none ; font-weight: bold;">New
Student Click Here</a></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="5%" align="center"><?php include
'Footer.php';?></td> </tr>
</table>
</form>
</body>
</html>
Student_login_handler
<?php
session_start();
include 'Connect.php';
$flag = "";
$student_id = $_POST['st_id'];
$st_pass = $_POST['st_pass'];
$query = "select last_login_date from student_information
where student_id='$student_id' and student_password='$st_pass'
and student_status ='Enable'";
$result = mysql_query($query,$link_id);
if(mysql_error() != null){
die(mysql_error());
}
if($date = mysql_fetch_array($result))
{
$lastdate = $date['last_login_date'];
$date2 = date("d-m-Y h:i A",strtotime($lastdate));
$_SESSION['userid'] = $_POST['st_id'];
$_SESSION['lastlogin'] =$date2;
$_SESSION['type'] = "Student";
mysql_query("update student_information set
last_login_date=now() where student_id='$student_id'",$link_id);
if(mysql_error() != null){
die(mysql_error());
}
header("location:Student_Home.php");
die();
}
else
{
$flag = "invalid";
header("location:Student_login.php?flag=$flag");
die();
}
?>
Student_Registration.php
<html>
<head>
<link rel="stylesheet" href="Style.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> <title>Student Registration Page</title> <script
src="Validation.js"></script>
<script type="text/javascript">
function validation()
{
if(document.form1.first_name.value=="")
{
alert("Please enter your first name.");
document.form1.first_name.focus();
return false;
}
if(document.form1.last_name.value=="")
{
alert("Please enter your last name.");
document.form1.last_name.focus();
return false;
}
if(document.form1.dob.value=="")
{
alert("Please enter your date of birth.");
document.form1.dob.focus();
return false;
}
else
{
var date = document.form1.dob.value;
var yes = checkDate(date);
if(!yes)
{
alert("Please Enter a valid date of birth.");
document.form1.dob.focus();
return false;
}
}
if(document.form1.email1.value=="")
{
alert("Please enter your primary email.");
document.form1.email1.focus();
return false;
}
else
{
var isEmail = emailValidator(document.form1.email1.value);
if(!isEmail)
{
alert("Please enter a valid primary email.");
document.form1.email1.focus();
return false;
}
}
if(document.form1.address.value != "" &&
document.form1.address.value.length > 100){
alert("You can enter address upto 100 characters only.");
document.form1.address.focus();
return false;
}
if(document.form1.description.value != "" &&
document.form1.description.value.length > 200){
alert("You can enter description upto 200 characters
only."); document.form1.description.focus(); return false;
}
if(document.form1.st_id.value=="")
{
alert("Please enter your desired student id.");
document.form1.st_id.focus();
return false;
}
if(document.form1.st_pass.value=="")
{
alert("Please enter your desired password.");
document.form1.st_pass.focus();
return false;
}
if(document.form1.retype.value=="")
{
alert("Please enter retype password.");
document.form1.retype.focus();
return false;
}
if(document.form1.st_pass.value != document.form1.retype.value)
{
alert("Password and retype password are not
same."); document.form1.st_pass.value = "";
document.form1.retype.value = "";
document.form1.st_pass.focus();
return false;
}
}
</script>
</head>
<body onLoad="javascript:document.form1.first_name.focus()">
<form name="form1" method="post"
action="Student_Registration_handler.php" onSubmit="return validation()"
enctype="multipart/form-data">
<table width="100%">
<tr>
<td width="100%" height="15%" align="center"><?php
include 'Header.php';?></td>
</tr>
<tr>
<td width="100%" height="80%" align="center"><table width="80%"
border="1" cellpadding="2" cellspacing="0" bordercolor="#CCCCCC">
<tr bgcolor="#EEEEEE">
<td colspan="4" align="center"
class="stylemedium">Student Information</td>
</tr>
<tr class="stylesmall">
<td>First Name <span class="stylered">*</span> </td>
<td><input name="first_name" type="text" id="first_name"
maxlength="50"></td>
<td>Last Name <span class="stylered">*</span> </td>
<td><input name="last_name" type="text" id="last_name"
maxlength="30"></td>
</tr>
<tr class="stylesmall">
<td>Gender</td>
<td><input name="gender" type="radio" value="Male"
checked> Male<input name="gender" type="radio"
value="Female"> Female</td>
<td>Date Of Birth <span class="stylered">*</span> </td>
<td><input name="dob" type="text" id="dob" size="10"
maxlength="10">
DD-MM-YYYY</td>
</tr>
<tr class="stylesmall">
<td>Qualification <span class="stylered">*</span> </td>
<td><select name="qualification" id="qualification">
<option value="">-----select-----</option>
<option value="High School">High School</option>
<option value="Graduate">Graduate</option>
<option value="MCA">MCA</option> <option
value="BCA">BCA</option>
<option value="Master Degree">Master Degree</option>
</select></td>
<td>Contact No</td>
<td><input name="contact_no" type="text" id="contact_no"
maxlength="20"></td>
</tr>
<tr class="stylesmall">
<td> City</td>
<td><input name="city" type="text" id="city" maxlength="30"></td>
<td> </td>
<td> </td>
</tr>
<tr class="stylesmall">
<td>Primary Email <span class="stylered">*</span>
</td> <td><input name="email1" type="text" id="email1"
maxlength="100"></td>
<td>Secondary Email</td>
<td><input name="email2" type="text" id="email2"
maxlength="100"></td>
</tr>
<tr class="stylesmall">
<td>Address</td>
<td colspan="3"><textarea name="address" cols="45" rows="2"
id="address"></textarea></td>
</tr>
<tr class="stylesmall">
<td> Description</td>
<td colspan="3"><textarea name="description" cols="45" rows="3"
id="description"></textarea></td>
</tr>
<tr bgcolor="#EEEEEE">
<td colspan="4" align="center"
class="stylemedium">Login Information</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr class="stylesmall">
<td>Desired ID <span class="stylered">*</span> </td>
<td><input name="st_id" type="text" id="st_id" maxlength="20"></td>
<td> </td>
<td> </td>
</tr>
<tr class="stylesmall">
<td>Password <span class="stylered">*</span> </td>
<td><input name="st_pass" type="password" id="st_pass"
maxlength="20"></td>
<td align="right">Retype Password<span class="stylered"> *</span>
</td>
<td><input name="retype" type="password" id="retype"
maxlength="20"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr bgcolor="#EEEEEE">
<td colspan="4" align="center" class="stylemedium">
Resume Information</td>
</tr>
<tr class="stylesmall">
<td>Upload Resume </td>
<td colspan="3"><input name="resume" type="file" >
<span
class="stylered">.doc , .txt, .pdf file
only</span></td> </tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr align="center" class="stylemedium" bgcolor="#EEEEEE">
<td colspan="4">Image Information</td>
</tr>
<tr class="stylesmall">
<td>Upload Image </td>
<td colspan="3"><input type="file" name="image">
<span
class="stylered"><span class="stylered">.jpg file And .gif
file only</span></td>
</tr>
<tr>
<td colspan="4"><span class="stylered">* <em>means fields
are compulsory</em> </span></td>
</tr>
<tr>
<td colspan="4" align="center"><input name="register"
type="submit" id="register" value="Register">
<input name="reset" type="reset" id="reset" value="Reset">
<input name="close" type="button" id="close" value="Close"
onClick="self.location='Student_login.php'"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="5%" align="center"><?php
include 'Footer.php';?></td>
</tr>
</table>
</form>
</body>
</html>
Student_Registration_handler.php
<?php
include 'Connect.php';
$flag = "success";
function rollbackData(){
mysql_query(" ROLLBACK ");
global $flag;
$flag = "error";
if(mysql_error() != null){
die(mysql_error());
}
}
$student_id = $_POST['st_id'];
$student_pass = $_POST['st_pass'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$gender = $_POST['gender'];
$contact_no = $_POST['contact_no'];
$qualification = $_POST['qualification'];
$city = $_POST['city'];
$email1 = $_POST['email1'];
$email2 = $_POST['email2'];
$address = $_POST['address'];
$description = $_POST['description'];
$resumename = "";
$imagename = "";
$dobdate = date("Y-m-
d",strtotime($_POST['dob'])); /*
This block is used to check whether the student_id already exits
in database.
*/
$select_query="select student_id from student_information
where student_id = '$student_id'";
$result_set = mysql_query($select_query,$link_id);
if($row = mysql_fetch_array($result_set)){
$flag="exists";
header("location:Student_login.php?
flag=$flag&student_id=$student_id");
die();
}
else{
/*
This block is used to insert the student record in database
if the student_id is already not present in the database.
*/
mysql_query("SET AUTOCOMMIT = 0 ");
if(mysql_error() != null){
die(mysql_error());
}
$query = "insert into
student_information(student_id,student_password,first_name,last_name,regis
tration_date,gender,date_of_birth,";
$query .=
"student_status,contact_no,qualification,city,email1,email2,address,descriptio
n)";
$query .= "
values('$student_id','$student_pass','$first_name','$last_name',now(),'$gender
','$dobdate','Disable','$contact_no',";
$query .=
"'$qualification','$city','$email1','$email2','$address','$description')";
$result = mysql_query($query,$link_id);
if(mysql_error() != null){
die(mysql_error());
}
if($result){
if($_FILES['resume']['name'] != ""){
$filename = $_FILES['resume']['name'];
$ext = strrchr($filename,".");
$resumename = $student_id;
$resumename .= "_".$filename;
if($ext ==".txt" || $ext ==".doc" || $ext ==".TXT"
|| $ext ==".DOC" || $ext ==".pdf" || $ext ==".PDF"){
$size = $_FILES['resume']['size'];
if($size > 0 && $size < 1000000){
$archive_dir = "resumes";
$userfile_tmp_name =
$_FILES['resume']['tmp_name'];
if(move_uploaded_file($userfile_tmp_name,
"$archive_dir/ $resumename")){
/*
if image is successfully
uploaded then resumename is stored in database.
*/
mysql_query("update
student_information set resume='$resumename'
where student_id='$student_id'", $link_id);
if(mysql_error() != null){
die(mysql_error());
}
$flag = "success";
}else{
rollbackData();
}
}
else{
rollbackData();
die("You can upload resume of 1 MB
size only. Please, try again.");
}
}
else{
rollbackData();
die("You can upload resume of .txt, .pdf,
.doc extensions only. Please, try again.");
}
}
if($_FILES['image']['name'] != ""){
$filename = $_FILES['image']['name'];
$ext = strrchr($filename,".");
$imagename = $student_id;
$imagename .="_". $filename;
if($ext ==".jpg" || $ext ==".jpeg" || $ext ==".JPG"
|| $ext ==".JPEG" || $ext ==".gif" || $ext ==".GIF"){
$size = $_FILES['image']['size'];
if($size > 0 && $size < 1000000){
$archive_dir = "images";
$userfile_tmp_name =
$_FILES['image']['tmp_name'];
if(move_uploaded_file($userfile_tmp_name,
"$archive_dir/ $imagename")){
/*
if image is successfully
uploaded then imagename is stored in
database. */
mysql_query("update
student_information set image='$imagename'
where student_id='$student_id'", $link_id);
$flag = "success";
if(mysql_error()!=null){
die(mysql_error());
}
}
else{
if(file_exists('resumes/' .
$resumename)) {
unlink('resumes/' .
$resumename);
}
rollbackData();
}
}
else{
if(file_exists('resumes/' .
$resumename)) {
unlink('resumes/' .
$resumename);
}
rollbackData();
die("You can upload image of 1 MB
size only. Please, try again.");
}
}
else{
if(file_exists('resumes/' . $resumename)) {
unlink('resumes/' . $resumename);
}
rollbackData();
die("You can upload images of .jpg, .jpeg,
.gif extensions only. Please, try again. ");
}
}
}
else{
$flag="error";
}
if($flag == "success"){
mysql_query(" COMMIT ");
$flag="success";
if(mysql_error() != null){
die(mysql_error());
}
/*
This block is used to send email to
the successfully registered users.
*/
/*
$to = $email1;
$subject = 'Congratulations';
$message = 'Congratulations you are registered in our
site.\r\n\r\n';
$message .= "Your Login Id : $student_id \r\n Password :
$student_pass";
$headers = "From: [email protected]\r\n";
$headers .= 'X-Mailer: PHP' . phpversion();
mail($to, $subject, $message, $headers);
*/
}
header("location:Student_login.php?flag=$flag");
die();
}
?>
Admin_Edit_Student_Info.php
<?php
session_start();
$session_id = $_SESSION['userid'];
if($session_id == null){
header("location:index.php");
die();
}
include 'Connect.php';
$student_id = $_REQUEST['student_id'];
$query = "select * from student_information
where student_id='$student_id'";
$result = mysql_query($query, $link_id);
$data = mysql_fetch_array($result);
?>
<html>
<head>
<link rel="stylesheet" href="Style.css" type="text/css"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1"> <title>Edit Student Information By Admin</title>
<script src="Validation.js"></script>
<script type="text/javascript">
function validation()
{
if(document.form1.first_name.value=="")
{
alert("Please enter your first name.");
document.form1.first_name.focus();
return false;
}
if(document.form1.last_name.value=="")
{
alert("Please enter your last name.");
document.form1.last_name.focus();
return false;
}
if(document.form1.dob.value=="")
{
alert("Please enter your date of birth.");
document.form1.dob.focus();
return false;
}
else
{
var date = document.form1.dob.value;
var yes = checkDate(date);
if(!yes)
{
alert("Please Enter a valid date of birth.");
document.form1.dob.focus();
return false;
}
}
if(document.form1.email1.value=="")
{
alert("Please enter your primary email.");
document.form1.email1.focus();
return false;
}
else
{
var isEmail = emailValidator(document.form1.email1.value);
if(!isEmail)
{
alert("Please enter a valid primary email.");
document.form1.email1.focus();
return false;
}
}
if(document.form1.email2.value != "")
{
var isEmail = emailValidator(document.form1.email2.value);
if(!isEmail)
{
alert("Please enter a valid secondary email.");
document.form1.email2.focus();
return false;
}
}
if(document.form1.address.value != "" &&
document.form1.address.value.length > 100){
alert("You can enter address upto 100 characters only.")
document.form1.address.focus();
return false;
}
if(document.form1.description.value != "" &&
document.form1.description.value.length > 200){
alert("You can enter description upto 200 characters only.")
document.form1.description.focus();
return false;
}
}
function SetAll()
{
document.form1.qualification.value="<?php echo
$data['qualification'];?>"; var gen = "<?php echo $data['gender'];?>"; var
gend = document.form1.gender.length;
for(var i =0; i<gend; i++)
{
if(document.form1.gender[i].value == gen)
document.form1.gender[i].checked=true;
}
}
</script>
</head>
<body onLoad="javascript:SetAll()">
<form name="form1" method="post"
action="Admin_Edit_Student_Info_Handler.php"
onSubmit="return validation()">
<input type="hidden" name="student_id" value="<?php echo $student_id;
? >;">
<table width="100%" height="100%" >
<tr bgcolor="#E1E1E1">
<td width="100%" height="15%" align="center"><?php
include 'Admin_Header.php';?></td>
</tr>
<tr>
<td width="100%" height="80%" align="center"><table width="80%"
border="1" cellpadding="2" cellspacing="0" bordercolor="#EEEEEE">
<tr>
<td colspan="4" align="center" bgcolor="#EEEEEE"
class="stylebig">Edit Student Information</td>
</tr>
<tr>
<td colspan="4" align="center">
<?php if($_GET['flag'] == "success") { ?>
<span class="stylered">Student Information
updated successfully.</span>
<?php } else if($_GET['flag'] == "error") { ?>
<span class="stylered">Error while updating
student information.Please, try again</span>
<?php } ?> </td>
</tr>
<tr class="stylesmall">
<td width="19%" align="left">First Name : </td>
<td width="30%" align="left"><input name="first_name"
type="text" id="first_name" value="<?php echo $data['first_name']; ?>"
size="25"maxlength="50"></td>
<td width="17%" align="left">Last name</td>
<td width="34%" align="left"><input name="last_name"
type="text" id="last_name" value="<?php echo $data['last_name'];?>"
size="25" maxlength="30"></td>
</tr>
<tr class="stylesmall">
<td height="29" align="left">Gender : </td>
<td align="left"><input name="gender" type="radio"
value="Male"> Male<input name="gender" type="radio"
value="Female"> Female</td>
<td align="left">Date Of Birth</td>
<td align="left"><input name="dob" type="text" id="dob"
size="10" maxlength="10" value="<?php echo date("d-m-
Y",strtotime($data['date_of_birth']));?>">
DD-MM-YYYY</td>
</tr>
<tr class="stylesmall">
<td align="left">Qualification : </td>
<td align="left"><select name="qualification" id="qualification">
<option value="High School">High School</option>
<option value="Graduate">Graduate</option>
<option value="MCA">MCA</option>
<option value="BCA">BCA</option>
<option value="Master Degree">Master
Degree</option> </select></td>
<td align="left">Contact No</td>
<td align="left"><input name="contact_no" type="text" id="contact_no"
value="<?php echo $data[$contact_no];?>" size="25" maxlength="20"></td>
</tr>
<tr class="stylesmall">
<td align="left">Primary Email : </td>
<td align="left"><input name="email1" type="text" id="email1"
value="<?php echo $data['email1'];?>" size="25" maxlength="100"></td>
<td align="left">Secondary Email</td>
<td align="left"><input name="email2" type="text" id="email2"
value="<?php echo $data['email2'];?>" size="25" maxlength="100"></td>
</tr>
<tr class="stylesmall">
<td align="left">City : </td>
<td colspan="3" align="left"><input name="city" type="text" id="city"
value="<?php echo $data['city'];?>" size="25" maxlength="30"></td>
</tr>
<tr class="stylesmall">
<td align="left">Address : </td>
<td colspan="3" align="left"><textarea name="address" rows="2"
cols="40"><?php echo $data['address'];?></textarea></td>
</tr>
<tr class="stylesmall">
<td align="left">Description : </td>
<td colspan="3" align="left"><textarea name="description" rows="3"
cols="40"><?php echo $data['description'];?></textarea></td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4" align="center"><input name="update" type="submit"
id="update" value="Update">
<input name="close" type="button" id="close" value="Close"
onClick="self.location='DisplayAll.php'"></td>
</tr>
</table></td>
</tr>
<tr bgcolor="#E1E1E1">
<td width="100%" height="5%" align="center"><?php
include 'Footer.php';?></td>
</tr>
</table>
</form>
</body>
</html>
Admin_Edit_Student_Info_Handler
<?php
session_start();
$session_id = $_SESSION['userid'];
if($session_id == null){
header("location:index.php");
die();
}
include 'Connect.php';
$student_id = $_POST['student_id'];
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$gender = $_POST['gender'];
$contact_no = $_POST['contact_no'];
$qualification = $_POST['qualification'];
$city = $_POST['city'];
$email1 = $_POST['email1'];
$email2 = $_POST['email2'];
$address = $_POST['address'];
$description = $_POST['description'];
$dateofbirth = date("Y-m-
d",strtotime($_POST['dob'])); $flag = "";
$query = "update student_information set
first_name='$first_name',last_name='$last_name',gender='$gender',date_of_
birth='$dateofbirth',";
$query .=
"qualification='$qualification',contact_no='$contact_no',email1='$email1',email
2='$email2',city='$city',address='$address',description='$description' ";
$query .= " where student_id='$student_id'";
$result = mysql_query($query, $link_id);
if(mysql_error() != null){
die(mysql_error());
}
if($result)
{
$flag = "success";
}
else
{
$flag = "error";
}
header("location:Admin_Edit_Student_Info.php?
flag=$flag&student_id=$student_id");
?>
Validation.js
function checkDate(dobStr)
{
var arr = dobStr.split(/-/);
if(arr.length != 3){
return false;
}
var ddStr = arr[0];
var mmStr = arr[1];
var yyStr = arr[2];
if(isNaN(ddStr)){
return false;
}
if(isNaN(mmStr)){
return false;
}
if(isNaN(yyStr)){
return false;
}
dd=parseInt(ddStr,10);
mm=parseInt(mmStr,10);
yy=parseInt(yyStr,10);
Style.css
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.stylebig {
font-size: 18px;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
.stylemedium {
font-size: 14px;
font-family: "Times New Roman", Times, serif;
font-weight: bold;
}
.stylesmall {
font-family: "Times New Roman", Times, serif;
font-size: 12px;
font-weight: bold;
}
.stylegreen {font-family: "Times New Roman", Times, serif; font-size: 12px;
font-weight: bold; color: #007F00; }
.stylered {
font-size: 12px;
font-family: "Times New Roman", Times, serif;
color: #FF0000;
font-weight: bold;
}
.stylegrey {font-family: "Times New Roman", Times, serif; font-size: 12px;
font-weight: bold; color: #550055; }
.stylegreyre {font-family: "Times New Roman", Times, serif; font-size: 12px;
font-weight: bold; color: #CCC; }
.stylelink {font-family: "Times New Roman", Times, serif; font-size: 12px; font-
weight: bold; color: #AA0000; }
.stylelink2 {font-family: "Times New Roman", Times, serif; font-size: 12px;
font-weight: bold; color: #999; }
Connect.php
<?php
$host = "localhost";
$dbusername = "root";
$dbpassword = "";
$dbname = "student";
After successful registration the user account needs to be first enabled by the
administrator.The students can then login into their accounts with the id and password
they choose during registration.The above page shows student login page.
After logging in the student home page is opened as shown above.
The student can view their profile.The above page shows the user profile.The link
to the resume is shown if a resume was uploaded during registration otherwise its
not shown.
Students can edit their profiles by using the edit profile option on their
homepage.the above page is used for editing student information.
The students have the option to change their password.They need their old
password in order to change the password.
After successful operation a password change notification is displayed to the user.
The above page is the administrator login page. It requires the administrator
username and password.
This is the homepage of administrator.
This is the displayall page wherein the administrator can see all the registered
students.He can enable/disable their accounts as well as view/edit students
information.
This page shows the change in account status.after successful change a message
is displayed to the administrator.
This is the search page and it provides search function to the administrator.here we
search for all the students with theirs accounts enabled.
This is the search result display page.the administrator can view profile of any of
the searched students from here.If there are no results then an appropriate
message is displayed.
SCOPE OF THE PROJECT
Our project Student Management System was developed by all three of us.We, a
team of three persons took a step by step approach in order to reach our goal.We
applied the knowledge we gained during our training period at EN
Technologies Pvt. Ltd. and developed this project “STUDENT MANAGEMENT
SYSTEM”.
Bibliography