-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
executable file
·100 lines (83 loc) · 2.13 KB
/
index.php
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
session_start();
?>
<html>
<head>
<title>Online Exam Portal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>
<body>
<?php
include("header.php");
include("database.php");
extract($_POST);
if(isset($submit))
{
$rs=mysql_query("select * from mst_user where login='$loginid' and pass='$pass'");
if(mysql_num_rows($rs)<1)
{
$found="N";
}
else
{
$_SESSION[login]=$loginid;
}
}
if (isset($_SESSION[login]))
{
echo "<h1 class='style8' align=center>Online Exam Portal</h1>";
echo '<table width="28%" border="1" align="center">
<tr>
<td width="93%" valign="bottom" bordercolor="#0000FF"> <a href="sublist.php" class="style4">Subject for Quiz </a></td>
</tr>
<tr>
<td valign="bottom"> <a href="result.php" class="style4">Result </a></td>
</tr>
</table>';
exit;
}
?>
<table width="100%" border="0">
<tr>
<td width="70%" height="25"> </td>
</tr>
<tr>
<td height="296" valign="top"><div style="margin-left:350px;" align="center">
<h1 >Online Quiz Portal</h1>
<form name="form1" method="post" action="">
<table width="200" border="0">
<tr>
<td><span class="style2">Login ID </span></td>
<td><input name="loginid" type="text" id="loginid2"></td>
</tr>
<tr>
<td><span class="style2">Password</span></td>
<td><input name="pass" type="password" id="pass2"></td>
</tr>
<tr>
<td colspan="2"><span class="errors">
<?php
if(isset($found))
{
echo "Invalid Username or Password";
}
?>
</span></td>
</tr>
<tr>
<td colspan=2 align=center class="errors">
<input name="submit" type="submit" id="submit" value="Login"> </td>
</tr>
<tr>
<td colspan="2" ><div align="center"><span class="style4">New User ? <a href="signup.php">Register Here</a></span></div></td>
</tr>
</table>
</form>
</div></td>
<td valign="top">
</td>
</tr>
</table>
</body>
</html>