-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
51 lines (48 loc) · 2.11 KB
/
signup.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
<?php
require_once "./includes/config_session.inc.php";
if (isset($_SESSION['user_id'])) {
header("Location: ./account.php");
die();
}
require_once "./includes/signup/signup_view.inc.php";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<title>Sign Up</title>
</head>
<body>
<?php include_once("./Components/header.php") ?>
<div class="container">
<form action="./includes/signup/signup.inc.php" method="post">
<input type="hidden" name="_token" value="<?php generateCSRFToken() ?>">
<div class="mb-3">
<label for="name" class="form-label">Name <span class="text-danger">*</span></label>
<input type="text" name="name" class="form-control" id="name"
value="<?php printRegisteredData("name") ?>">
</div>
<div class="mb-3">
<label for="email" class="form-label">Email <span class="text-danger">*</span></label>
<input type="text" name="email" class="form-control" id="email"
value="<?php printRegisteredData("email") ?>">
</div>
<div class="mb-3">
<label for="password" class="form-label">Password <span class="text-danger">*</span></label>
<input type="password" name="password" class="form-control" id="password">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<div>
<?php printErrors() ?>
</div>
</form>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous">
</script>
</body>
</html>
<?php unsetSessVars() ?>