-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome_page.php
69 lines (52 loc) · 1.62 KB
/
home_page.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
<!-- new users can register and registered users and admin can login using credentials -->
<?php
session_start();
//echo "Exam is completed";
//remove all session variables
session_unset();
//destroy the session
session_destroy();
?>
<html>
<head>
</head>
<body style="background-color: #7b93a3" >
<h1 style="border-style: solid; border-width: 5px; background-color: lightgrey;">WELCOME TO CLOUD EXAMINATION PORTAL</h1>
<br>
<table >
<tr>
<td width="400">
<h3>Had an account?login</h3>
<form method="post" action="validate_login.php">
Emailid:   <input type="email" name="emailid" value=""><br>
Password:   <input type="password" name="password" value=""><br>
<br>
<input type="submit" value="submit">
</form>
</td>
<td valign="top">
<h3>New user? register now</h3>
<form action="Register.php">
<input type="submit" value="Register">
</form>
</td>
<td align="right">
<h3>Admin</h3>
<form method="post" action="validate_admin.php">
Emailid:   <input type="email" name="emailid" value=""><br>
Password:   <input type="password" name="password" value=""><br>
<br>
<input type="submit" value="submit">
</form>
</td>
</tr>
</table>
<?php
$err = filter_input(INPUT_GET, 'error');
if ($err === "login") echo "<script>alert('Invalid login!');</script>";
//header("Location:Login_page.php");
else if($err==="alreadyRegistered") echo "<script>alert('Already Registered!');</script>";
else if($err==="SuccessfullyRegistered") echo "<script>alert('Successfully Registered!');</script>";
?>
</body>
</html>