forked from SWU-Petranaki/SWUOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignup.php
More file actions
63 lines (55 loc) · 1.67 KB
/
Signup.php
File metadata and controls
63 lines (55 loc) · 1.67 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
<?php
include_once 'MenuBar.php';
?>
<?php
include_once 'Header.php';
?>
<div class="core-wrapper">
<div class="flex-padder"></div>
<div class="flex-wrapper">
<div class='signup-wrapper container bg-black'>
<section class="signup-form">
<h2>Sign Up</h2>
<div class="signup-form-form">
<form action="includes/signup.inc.php" method="post">
<label for="uid">Username</label>
<input type="text" name="uid">
<label for="email">Email</label>
<input type="text" name="email" placeholder="name@example.com">
<label for="pwd">Password</label>
<input type="password" name="pwd">
<label for="pwdrepeat">Repeat Password</label>
<input type="password" name="pwdrepeat">
<div style="text-align:center;">
<button type="submit" name="submit">Sign Up</button>
</div>
</form>
</div>
<?php
// Error messages
if (isset($_GET["error"])) {
if ($_GET["error"] == "emptyinput") {
echo "<p>Fill in all fields!</p>";
} else if ($_GET["error"] == "invaliduid") {
echo "<p>Choose a username without any special characters</p>";
} else if ($_GET["error"] == "invalidemail") {
echo "<p>Choose a valid email</p>";
} else if ($_GET["error"] == "passwordsdontmatch") {
echo "<p>Passwords doesn't match!</p>";
} else if ($_GET["error"] == "stmtfailed") {
echo "<p>Something went wrong!</p>";
} else if ($_GET["error"] == "usernametaken") {
echo "<p>Username already taken!</p>";
} else if ($_GET["error"] == "none") {
echo "<h2>You've signed up!</h2>";
}
}
?>
</section>
</div>
</div>
<div class="flex-padder"></div>
</div>
<?php
include_once 'Disclaimer.php';
?>