-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
84 lines (84 loc) · 2.52 KB
/
signup.php
File metadata and controls
84 lines (84 loc) · 2.52 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
<!--http://www.webformfactory.com/-->
<?php
$PageTitle="New Page Title";
$HighlightMarginLeft="50%";
function customPageHeader(){?>
<!--h1>Sign Up0</h1-->
<?php }
include_once('header.php');
?>
<h1>Sign Up</h1>
<br><br>
<div class="errorBox">
<?php
if(isset($_GET["error"])){
if($_GET["error"] == "emptyinput"){
echo "<p>Fill in all empty fields</p>";
}
else if($_GET["error"] == "invaliduid"){
echo "<p>Username contains invalid characters</p>";
}
else if($_GET["error"] == "invalidemail"){
echo "<p>Email doesn't exist</p>";
}
else if($_GET["error"] == "passwordsdontmatch"){
echo "<p>Fill in all empty fields</p>";
}
else if($_GET["error"] == "stmtfailed1"){
echo "<p>001 Something went wrong, please try again</p>";
}
else if($_GET["error"] == "stmtfailed2"){
echo "<p>002 Something went wrong, please try again</p>";
}
else if($_GET["error"] == "usernametaken"){
echo "<p>That username is taken</p>";
}
else if($_GET["error"] == "none"){
echo "<p>Thank you! You have been signed up :)</p>";
}
}
?>
</div>
<form action="includes/signup.inc.php" method="post">
<div class="row">
<div class="col">
<label>Email:</label>
</div>
<div class="col">
<input type="text" name="email" placeholder="email">
</div>
</div>
<div class="row">
<div class="col">
<label>Username:</label>
</div>
<div class="col">
<input type="text" name="uid" placeholder="username">
</div>
</div>
<div class="row">
<div class="col">
<div class="text-end">
<label>Password:</label>
</div>
</div>
<div class="col">
<input type="password" name="pwd" placeholder="password">
</div>
</div>
<div class="row">
<div class="col">
<div class="float-end">
<label>Repeat Password:</label>
</div>
</div>
<div class="col">
<input type="password" name="pwdrepeat" placeholder="repeat password">
</div>
</div>
<br>
<button type="submit" name="submit">Sign Up</button>
</form>
<?php
include_once('footer.php');
?>