-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.html
51 lines (51 loc) · 1.47 KB
/
dashboard.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Dashboard</title>
<link rel="stylesheet" href="style.css">
<style>
.dashboard-container {
text-align: center;
}
.welcome-message {
font-size: 24px;
margin-bottom: 20px;
}
.button {
display: inline-block;
padding: 10px 20px;
background-color: #4CAF50;
color: white;
text-decoration: none;
border-radius: 5px;
font-size: 16px;
transition: background-color 0.3s;
}
.button:hover {
background-color: #45a049;
}
.logout-link {
margin-top: 20px;
display: block;
}
</style>
</head>
<body>
<div class="container dashboard-container">
<h1>User Dashboard</h1>
<p class="welcome-message">Welcome, <span id="user-name"></span>!</p>
<a href="receipt.php" class="button">Generate Receipt</a>
<a href="logout.php" class="logout-link">Logout</a>
</div>
<script>
fetch('get_user_name.php')
.then(response => response.json())
.then(data => {
document.getElementById('user-name').textContent = data.name;
})
.catch(error => console.error('Error:', error));
</script>
</body>
</html>