-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
38 lines (33 loc) · 1.09 KB
/
index.php
File metadata and controls
38 lines (33 loc) · 1.09 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
<?php
include_once 'connection.php';
if ($_COOKIE['userEmail'] && $_COOKIE['userType'] == 'normal') {
header("location: sections/search.php");
exit;
} else if ($_COOKIE['userEmail'] && $_COOKIE['userType'] == 'admin') {
header("location: admin/manageUsers.php");
exit;
}
?>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="javascript/login.js"></script>
</head>
<body>
<h3 class="login-header">Cookbook Database Login</h3>
<form id="login-form" method="post" action="sections/login.php">
<!-- Login Email -->
<div class="login-field-wrap">
<label>Email:</label>
<input type="text" class="login-input" name="email">
</div>
<!-- Login Password -->
<div class="login-field-wrap">
<label>Password:</label>
<input type="password" class="login-input" name="password">
</div>
<!-- Submit Button -->
<button type="submit" onClick="loginClicked()" name="login" class="login-button">Login</button>
</form>
</body>
</html>