Uploaded by harshmishra

Shreya Srivastava 2019011143-Copy

advertisement
MADAN MOHAN MALAVIYA
UNIVERSITY OF TECHNOLOGY,
GORAKHPUR
UNIVERSITY MANAGEMENT SYSTEM
Made By: ABHISHEK
Shreya Srivastava
RAWAT
Roll No: 2020021008
2019011143
B.TECH
Computer Science and Engineering
2nd year(4th sem)
Software Lab-IV
BCS-18
HOME PAGE :
Admin can login using email id and password:
Faculty can login using email id and password:
Student can login using email id and password:
Admin can search for student using roll no:
↳Admin can add student
Admin can remove student by roll no:
Admin can edit student details:
Faculty Dashboard:
Faculty can edit student marks and
attendance by entering roll no:
SOURCE CODE:
index.php :<!DOCTYPE html>
<html>
<head>
<title>Admin Dashboard</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
<style type="text/css">
#header{
height: 25%
width: 200%
top: 50%;
background-color: brown;
position: center;
color: white;
}
#left_side{
height: 75%
width: 15%;
top: 20%;
position: fixed;
}
#right_side{
height: 75%;
width: 80%;
background-colour:#A85751";
position: fixed;
Left: 17%;
top: 21%;
color: white;
border:solid 1px black;
}
#top_span{
top: 15%;
width: 80%;
left: 17%;
position: fixed;
}
#colorof{
color: white;
}
.button{
background-color: #343a40;
color: white;
text-align: center;
width: 100%;
font-size: 20px;
padding: 15px 20px 15px 20px;border-radius: 25px;
}
</style>
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
?>
</head>
<body>
<div id="header" style="color:white;font-size:50px;">
<center><strong>UNIVERSITY MANAGEMENT
SYSTEM           &e
msp;  </strong>
<a href="logout.php">LOGOUT</a>
</center>
</div>
<div id="left_side"><br><br><br>
<form action="" method="post">
<table>
<tr>
<td>
<input style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="search_student" value="
Search Student
"><br><br><br>
</td>
</tr>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="add_student" value="
Add
Student
">
<br><br><br>
</td>
</tr>
<tr>
<td>
<input style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="remove_student" value=" Remove Student "><br><br><br>
</td>
</tr>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="edit_student_detail" value="Edit Student Detail">
</td>
</tr>
</table>
</form>
</div>
<div right_side>
</div>
</body>
</html>
admin_login.php :<!DOCTYPE html>
<html>
<head><br><br><br><br>
<title>Admin Login</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
</head>
<body style="background-color:#A85751">
<center>
<h3 style="color:white;font-size:60px;">ADMIN LOGIN</h3><br><br><br>
<form style="color:white;font-size:30px;" action=""method="post">
Email: <input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="text" name="email" required><br><br>
Password: <input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="password" name="password" required><br><br>
<input
style="background-color:brown;color:whitesmoke;font-size:20px;"type
="submit" name ="submit">
</form><br>
<?php
session_start();
if(isset($_POST['submit'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query ="select * from login where email = '$_POST[email]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
if($row['email'] == $_POST['email']){
if($row['password'] == $_POST['password']){
header("Location: admin_dashboard.php");
}
else{
echo "Wrong Password";
}}
else{
echo "Wrong Email ID";
}
}
}
?>
</center>
</body>
</html>
faculty_login.php :<!DOCTYPE html>
<html>
<head>
<title>Faculty Login</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
</head>
<body style="background-color:#A85751">
<center><br><br><br><br>
<h3 style="color:white;font-size:60px;"">FACULTY LOGIN</h3><br>
<form style="color:white;font-size:30px;" action=""method="post">
Email:<input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="text" name="email" required><br><br>
Password:<input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="password" name="password" required><br><br>
<input style="background-color:brown;color:whitesmoke;font-size:20px;"
type ="submit" name ="submit">
</form><br>
<?php
session_start();
if(isset($_POST['submit'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query ="select * from faculty where email = '$_POST[email]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
if($row['email'] == $_POST['email']){
if($row['password'] == $_POST['password']){
header("Location: faculty_dashboard.php");
}
else{
echo "Wrong Password";
}}
else{
echo "Wrong Email ID";
}
}
}
?>
</center>
</body>
</html>
student_login.php :<!DOCTYPE html>
<html>
<head>
<title>Student Login</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
</head>
<body style="background-color:#A85751">
<center><br><br><br><br>
<h3 style="color:white;font-size:60px;">STUDENT LOGIN</h3><br>
<form style="color:white;font-size:30px;" action=""method="post">
Email:<input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="text" name="email" required><br><br>
Password:<input
style="background-color:brown;color:whitesmoke;font-size:30px;" type
="password" name="password" required><br><br>
<input style="background-color:brown;color:whitesmoke;font-size:20px;"
type ="submit" name ="submit">
</form><br>
<?php
session_start();
if(isset($_POST['submit'])){
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query ="select * from student where email = '$_POST[email]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
if($row['email'] == $_POST['email']){
if($row['password'] == $_POST['password']){
header("Location: student_dashboard.php");
}
else{
echo "Wrong Password";
}}
else{
echo "Wrong Email ID";
}
}
}
?>
</center>
</body>
</html>
admin_dashboard.php :<!DOCTYPE html>
<html>
<head>
<title>Admin Dashboard</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
<style type="text/css">
#header{
height: 25%
width: 200%
top: 50%;
background-color: brown;
position: center;
color: white;
}
#left_side{
height: 75%
width: 15%;
top: 20%;
position: fixed;
left:30px;
}
#right_side{
position: relative;
left: 650px;
bottom:-150px;
width: 1100px;
height: 700px;
border: 3px solid brown;
background-color:#F5F5DC;
}
</style>
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
?>
<body style="background-color:#DEB887;">
<div id="header" style="color:white;font-size:50px;">
<center><strong>UNIVERSITY MANAGEMENT
SYSTEM           &e
msp;  </strong>
<a href="logout.php">LOGOUT</a><br>
Admin Dashboard
</center>
</div>
<div id="left_side"><br><br><br>
<form action="" method="post">
<table>
<tr>
<td>
<input style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="search_student" value="
Search Student
"><br><br><br>
</td>
</tr>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="add_student" value="
Add
Student
">
<br><br><br>
</td>
</tr>
<tr>
<td>
<input style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="remove_student" value=" Remove Student "><br><br><br>
</td>
</tr>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="edit_student_detail" value="Edit Student Detail">
</td>
</tr>
</table>
</form>
</div>
<div id="right_side"><br><br><center>
<div id="demo">
<?php
if(isset($_POST['search_student'])){
}
?>
<center>
<form style="color:brown;" action="" method="post">
Enter Roll No:
<input style="background-color:brown;" type="text" name="roll_no">
<input style="background-color:white;color:brown;" type="submit"
name="search_by_roll_no_for_search" value="Search">
</form>
</center>
<?php
}
if(isset($_POST['search_by_roll_no_for_search']))
{
$query = "select * from students where roll_no = '$_POST[roll_no]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
?>
<table>
<tr>
<td>
<b>Roll No:  </b></td>
<td>
<input type="text" value="<?php echo $row['roll_no'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b>Name:  </b></td>
<td><input type="text" value="<?php echo $row['name'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b>Fathers Name:  </b></td>
<td>
<input type="text" value="<?php echo $row['father_name'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b>Attendance:  </b></td>
<td>
<input type="text" value="<?php echo $row['attendance'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b>Marks:  </b></td>
<td>
<input type="text" value="<?php echo $row['marks'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b>Email:  </b></td><td>
<input type="text" value="<?php echo $row['email'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<td>
</td>
</td>
</tr>
</table>
<?php
}
}
?>
<?php
if(isset($_POST['add_student']))
{
}
?>
<center><h4 style="color:brown;">Fill the given details:</h4></center>
<form action="add_student.php" method="post">
<table>
<tr>
<td style="color:brown;">Roll No:</td>
<td>
<input type="text" name="roll_no" required>
</td>
</tr>
<tr>
<td style="color:brown;">Name:</td>
<td>
<input type="text" name="name" required>
</td>
</tr><tr>
<td style="color:brown;">Fathers name:</td>
<td>
<input type="text" name="father_name" required>
</td>
</tr>
<tr>
<td style="color:brown;">Attendance:</td>
<td>
<input type="text" name="attendance" required>
</td>
</tr>
<tr>
<td style="color:brown;">Marks:</td>
<td>
<input type="text" name="marks" required>
</tr>
<tr>
<td style="color:brown;">Email:</td>
<td>
<input type="text" name="email" required>
</td>
</tr>
<tr>
<td style="color:brown;">Password:</td>
<td>
<input type="text" name="password" required>
</td>
</tr>
<tr><td>
<td>
<input style="background-color:brown;color:white;"type="submit" name="add"
value="Add Student">
</td>
</td>
</tr>
</table>
</form>
<?php
if(isset($_POST['remove_student'])){
}
?>
<center>
<h4 style="color:brown;">Enter Roll No to remove Student</h4>
<form action="delete_student.php" method="post">
Roll No:
<input style="color:brown;" type="text" name="roll_no">
<input style="background-color:brown;color:white;" type="submit"
name="search_by_roll_no_for_delete" value="Delete
Student">
</form>
</center>
<?php
if(isset($_POST['edit_student_detail']))
{
}
?>
<center>
<form style="color:brown;" action="" method="post">
Enter Roll No:
<input style="background-color:brown;" type="text" name="roll_no">
<input
style="background-color:brown;color:white;"
type="submit"
name="search_by_roll_no_for_edit" value="Edit">
</form>
</center>
<?php}
if(isset($_POST['search_by_roll_no_for_edit']))
{
$query = "select * from students where roll_no = '$_POST[roll_no]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
?>
<form action="admin_edit_student.php" method="post">
<table>
<tr>
<td>
<b>Roll No:  </b></td>
<td>
<input type="text" name="roll_no" value="<?php echo $row['roll_no'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Name:  </b></td>
<td>
<input type="text" name="name" value="<?php echo $row['name'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Fathers Name:  </b></td>
<td><input type="text" name="father_name" value="<?php echo
$row['father_name'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Attendance:  </b></td>
<td>
<input type="text" name="attendance" value="<?php echo
$row['attendance'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Marks:  </b></td>
<td>
<input type="text" name="marks" value="<?php echo $row['marks'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Email:  </b></td>
<td>
<input type="text" name="email" value="<?php echo $row['email'];?>" >
</td>
</td>
</tr>
<br><br><tr>
<td></td>
<td><input type="submit" name="edit" value="Save">
</td>
</tr>
</table>
</form>
<?php
}
}
?>
faculty_dashboard.php :<!DOCTYPE html>
<html>
<head>
<title>Faculty Dashboard</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
<style type="text/css">
#header{
height: 25%
width: 200%
top: 50%;
background-color: brown;
position: center;
color: white;
}
#left_side{
height: 75%
width: 15%;
top: 20%;
position: fixed;
left:30px;
}
#right_side{
position: relative;
left: 650px;
bottom:-150px;
width: 1100px;
height: 700px;
border: 3px solid brown;
background-color:#F5F5DC;
}
</style>
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
?>
<body style="background-color:#DEB887;">
<div id="header" style="color:white;font-size:50px;">
<center><strong>UNIVERSITY MANAGEMENT SYSTEM
            &e
msp; </strong>
<a href="logout.php">LOGOUT</a><br>
Faculty Dashboard
</center>
</div>
<div id="left_side"><br><br><br>
<form action="" method="post">
<table>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:40px;"
type="submit" name="edit_student_detail" value="Edit Student
marks"><br><br>
</td>
</tr>
<tr>
<td>
<input
style="background-color:brown;color:whitesmoke;font-size:38px;"
type="submit" name="edit_student_detail" value="Edit Student attendance">
</td>
</tr>
</table>
</form>
</div>
<div id="right_side"><br><br><center>
<div id="demo">
<?php
if(isset($_POST['edit_student_detail']))
{
}
?>
<center>
<form style="color:brown;" action="" method="post">
Enter Roll No:
<input style="background-color:brown;" type="text" name="roll_no">
<input
style="background-color:brown;color:white;"
type="submit"
name="search_by_roll_no_for_edit" value="Edit">
</form>
</center>
<?php
if(isset($_POST['search_by_roll_no_for_edit']))
{
$query = "select * from students where roll_no = '$_POST[roll_no]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
?>
<form action="admin_edit_student.php" method="post">
<table>
<tr>
<td>
<b>Roll No:  </b></td>
<td>
<input type="text" name="roll_no" value="<?php echo $row['roll_no'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Name:  </b></td>
<td>
<input type="text" name="name" value="<?php echo $row['name'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Fathers Name:  </b></td>
<td><input type="text" name="father_name" value="<?php echo
$row['father_name'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Attendance:  </b></td>
<td>
<input type="text" name="attendance" value="<?php echo
$row['attendance'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Marks:  </b></td>
<td>
<input type="text" name="marks" value="<?php echo $row['marks'];?>" >
</td>
</td>
</tr>
<tr>
<td>
<b>Email:  </b></td>
<td>
<input type="text" name="email" value="<?php echo $row['email'];?>" >
</td>
</td>
</tr>
<br><br><tr>
<td></td>
<td><input type="submit" name="edit" value="Save">
</td>
</tr>
</table>
</form>
<?php
}
}
?>
student_dashboard.php :<!DOCTYPE html>
<html>
<head>
<title>Admin Dashboard</title>
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min
.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf
23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYf
oRSJoZ+n" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVv
oxMfooAo" crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.j
s"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3
Og8ifwB6" crossorigin="anonymous"></script>
<style type="text/css">
#header{
height: 25%
width: 200%
top: 50%;
background-color: brown;
position: center;
color: white;
}
#right_side{
position: relative;
left: 450px;
bottom:-150px;
width: 1100px;
height: 700px;
border: 3px solid brown;
background-color:#F5F5DC;
}
</style>
<?php
session_start();
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
?>
<body style="background-color:#DEB887;">
<div id="header" style="color:white;font-size:50px;">
<center><strong>UNIVERSITY MANAGEMENT
SYSTEM           &e
msp;  </strong>
<a href="logout.php">LOGOUT</a><br>
Student Dashboard
</center>
</div>
<?php
$query = "select * from students where email = '$_SESSION[email]'";
$query_run = mysqli_query($connection,$query);
while($row = mysqli_fetch_assoc($query_run)){
?>
<div id="right_side">
<form action="" method="post">
<b>        </b>
<table><tr></tr><tr></tr>
<tr>
<td>
<b style="color:brown;">Roll No:  </b></td>
<td>
<input style="background-color:brown;color:white;" type="text"
value="<?php echo
$row['roll_no'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b style="color:brown;">Name:  </b></td>
<td>
<input style="background-color:brown;color:white;" type="text"
value="<?php echo $row['name'];?>"
disabled >
</td>
</td>
</tr>
<tr>
<td>
<b style="color:brown;">Fathers Name:  </b></td>
<td>
<input style="background-color:brown;color:white;" type="text"
value="<?php echo
$row['father_name'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b style="color:brown;">Attendance:  </b></td>
<td>
<input type="text" value="<?php echo
$row['attendance'];?>" disabled >
</td>
</td>
</tr>
<tr>
<td>
<b style="color:brown;">Marks:  </b></td>
<td>
<input style="background-color:brown;color:white;" type="text"
value="<?php echo $row['marks'];?>"
disabled >
</td>
</td>
</tr>
<tr>
<td>
<b style="color:brown;">Email:  </b></td>
<td>
<input style="background-color:brown;color:white;" type="text"
value="<?php echo $row['email'];?>"
disabled >
</td>
</td>
</tr>
</table>
</form>
</center>
</div>
<?php
}
?>
</body>
</html>
faculty_edit_attendance.php :<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query = "update students set
attendance='$_POST[attendance]' where roll_no=
$_POST[roll_no]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Details Edited Successfully!");
window.location.href="index.php";
</script>
faculty_edit_marks.php :<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query = "update students set
marks='$_POST[marks]' where roll_no=
$_POST[roll_no]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Details Edited Successfully!");
window.location.href="index.php";
</script>
logout.php :<?php
session_start();
session_unset();
header("Location:index.php");
?>
add_student.php :<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query="insert into students
values($_POST[roll_no],'$_POST[name]','$_POST[father_name]',$_POST[atten
dance],$_POST[marks],'$_POST[email]','$_POST[password]')";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Student Added
Successfully!");window.location.href="admin_dashboard.php";
</script>
admin_edit_student.php :<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query = "update students set
name='$_POST[name]',father_name='$_POST[father_name]',attendance='$_P
OST[attendance]',marks='$_POST[marks]',email='$_POST[email]' where
roll_no= $_POST[roll_no]";
$query_run = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Details Edited Successfully!");
window.location.href="admin_dashboard.php";
</script>
delete_student.php :<script type="text/javascript">
if(confirm("Are you sure you want to delete the student?")){
document.write("<?php
$connection = mysqli_connect("localhost","root","");
$db = mysqli_select_db($connection,"ums");
$query="delete from students where roll_no= $_POST[roll_no]";$query_run =
mysqli_query($connection,$query);
?>");
window.location.href="admin_dashboard.php";
}
else{
window.location.href="admin_dashboard.php";
}
</script>
Download