-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
49 lines (43 loc) · 822 Bytes
/
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
<?php
require_once "app/init.php";
if (!empty($_POST)) {
$email = $_POST["email"];
$username = $_POST["username"];
$password = $_POST["password"];
$created = $auth->create([
'email' => $email,
'username' => $username,
'password' => $password
]);
if ($created) {
header('Location: index.php');
}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Sign up</title>
</head>
<body>
<form action="signup.php" method="post">
<fieldset>
<legend>Sign in</legend>
<label>
Email
<input type="text" name="email">
</label>
<label>
User
<input type="text" name="username">
</label>
<label>
Password
<input type="password" name="password">
</label>
</fieldset>
<input type="submit" value="Sign up">
</form>
</body>
</html>