-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
110 lines (97 loc) · 4.47 KB
/
signup.php
File metadata and controls
110 lines (97 loc) · 4.47 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="en-UK">
<head>
<?php include_once("./includes/headTags.php"); ?>
<link rel="stylesheet" href="./css/signup.css">
</head>
<body>
<!-- Header Section -->
<?php include_once("./includes/header.php"); ?>
<?php
if (isset($_SESSION["user"])) {
header("Location: ./dashboard.php");
}
?>
<!-- Main Content -->
<main>
<form action="./php/register.php" method="POST">
<h1>Signup</h1>
<br>
<label for="first_name">First Name</label>
<br>
<input type="text" name="first_name" placeholder="First Name" alt="First Name Textbox">
<br>
<br>
<label for="last_name">Last Name</label>
<br>
<input type="text" name="last_name" placeholder="Last Name" alt="Last Name Textbox">
<br>
<br>
<label for="date_of_birth">Date of Birth</label>
<br>
<div id="dobContainer">
<select id="day" name="day" placeholder="Day">
<option value="Default">Day</option>
<?php
for($i = 1; $i < 32; $i++) {
echo "<option value='$i'>$i</option>";
}
?>
</select>
<select id="month" name="month">
<option value="Default">Month</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
<select id="year" name="year">
<option value="Default">Year</option>
<?php
$currentYear = date("Y");
for ($i = $currentYear; $i > ($currentYear-100); $i--) {
echo "<option value='$i'>$i</option>";
}
?>
</select>
</div>
<!-- <input type="date" name="date_of_birth" placeholder="Date of Birth" alt="Date of Birth Textbox"> -->
<br>
<label for="email">Email address</label>
<br>
<input type="email" name="email" placeholder="Email" alt="Email Textbox">
<br>
<br>
<label for="password">Password</label>
<br>
<input type="password" name="password" placeholder="Password" alt="Password Textbox">
<br>
<br>
<label for="confirm_password">Confirm Password</label>
<br>
<input type="password" name="confirm_password" placeholder="Confirm Password" alt="Confirm Password Textbox">
<br>
<br>
<input type="checkbox" name="agreeTOS" value="true" alt="I agree to the Terms & Conditions and Privacy Policy*">
<label for="agreeTOS">I agree to the <b><a href="#">Terms & Conditions</a></b> and <b><a href="#">Privacy Policy</a></b>*</label>
<br>
<br>
<br>
<input type="submit" name="submit" placeholder="Signup" alt="Signup Button" value="Signup">
<br>
<br>
<a id="gotAccountText" href="./login.php">Already got an account? <b>Login</b></a>
</form>
</main>
<!-- Footer Section -->
<?php include_once("./includes/footer.php"); ?>
</body>
</html>