-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUser.php
50 lines (43 loc) · 1.22 KB
/
User.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
<?php
session_start();
$action = $_POST['action'] ?? '';
switch ($action) {
case 'view_surveys':
header('Location: viewUserSurveys.php');
exit;
case 'view_account':
header('Location: viewAccount.php');
exit;
case 'update_account':
header('Location: updateAccount.php');
exit;
case 'exit':
session_destroy();
header('Location: Home.php');
exit;
default:
break;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>User Dashboard</title>
<link rel="stylesheet" href="css/user-styles.css">
</head>
<body>
<div class="sidenav">
<form action="User.php" method="post">
<button type="submit" name="action" value="view_surveys">View Surveys</button>
<button type="submit" name="action" value="view_account">View Account</button>
<button type="submit" name="action" value="update_account">Update Account</button>
<button type="submit" name="action" value="exit">Exit</button>
</form>
</div>
<div class="content">
<h1>Welcome to the User Dashboard</h1>
<p>Select from options on left!</p>
</div>
</body>
</html>