-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdateprofile.php
61 lines (57 loc) · 1.93 KB
/
updateprofile.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
<?php
session_start();
if (!isset($_SESSION['uid'])) {
// Redirect to login if no user is logged in
header('Location: login.html');
exit();
}
$uid = $_SESSION['uid'];
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Blog Register</title>
<script>
const uid = "<?php echo $uid; ?>"; // Embed the PHP session user ID into JavaScript
</script>
<link rel="stylesheet" href="backend/public/assets/css/register.css" />
<script type="module" src="backend/public/assets/js/pages/updateProfile.js"></script>
</head>
<body>
<div class="login-container">
<div class="login-form">
<h2>Login to Your Blog</h2>
<form id="register-form" method="post">
<div class="form-group">
<label for="fname">Firstname:</label>
<input type="text" id="fname" name="fname" />
<small class="error-field" id="error-fname"></small>
</div>
<div class="form-group">
<label for="lname">Lastname:</label>
<input type="text" id="lname" name="lname" />
<small class="error-field" id="error-lname"></small>
</div>
<div class="form-group">
<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob" />
<small class="error-field" id="error-dob"></small>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" />
<small class="error-field" id="error-email"></small>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" />
<small class="error-field" id="error-password"></small>
</div>
<button type="submit" class="login-btn">Sign up</button>
</form>
</div>
</div>
</body>
</html>