-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
80 lines (75 loc) · 1.67 KB
/
index.php
File metadata and controls
80 lines (75 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
include("configASL.php");
session_start();
if(isset($_SESSION['aid']))
{
header("location:home.php");
}
if(!empty($_POST))
{
$aid=mysqli_real_escape_string($al,$_POST['aid']);
$pass=mysqli_real_escape_string($al,sha1($_POST['pass']));
$sql=mysqli_query($al,"select * from admin where aid='$aid' and password='$pass'");
if(mysqli_num_rows($sql)==1)
{
$_SESSION['aid']=$_POST['aid'];
header("location:home.php");
}
else
{
?>
<script type="text/javascript">
alert("Incorrect Admin ID or Password");
</script>
<?php
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Student Feedback System</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="topHeader">
CMC B5 PROJECT<br />
<span class="tag">STUDENT FEEDBACK SYSTEM</span>
</div>
<br>
<br>
<br>
<br>
<div id="content" align="center">
<br>
<br>
<span class="SubHead">Admin Login</span>
<form method="post" action="" >
<div id="table">
<div class="tr">
<div class="td">
<label>Admin ID : </label>
</div>
<div class="td">
<input type="text" name="aid" size="25" required />
</div>
</div>
<div class="tr">
<div class="td">
<label>Password : </label>
</div>
<div class="td">
<input type="password" name="pass" size="25" required />
</div>
</div>
</div>
<div class="tdd">
<input type="button" onClick="window.location='mainhome.html'" value="Home"/> <input type="submit" value="Login" />
</div>
<br>
</div>
</form>
<br>
</body>
</html>