forked from One-Piece-Online/OPOnline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSignup.php
More file actions
49 lines (47 loc) · 1.49 KB
/
Signup.php
File metadata and controls
49 lines (47 loc) · 1.49 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
<?php
include_once 'MenuBar.php';
?>
<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
<input type="text" name="uid">
</label>
<label for="email">Email
<input type="text" name="email" placeholder="name@example.com">
</label>
<label for="pwd">Password
<input type="password" name="pwd" placeholder="Password...">
</label>
<label for="pwdrepeat">Repeat password...
<input type="password" name="pwdrepeat" placeholder="Repeat password...">
</label>
<button type="submit" name="submit">SIGN UP</button>
</form>
</div>
<br>
<?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>
<?php
include_once 'Disclaimer.php';
?>