-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
83 lines (70 loc) · 2.58 KB
/
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
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
<html>
<head>
<title>Signup</title>
<link rel="icon" type="image/jpg" href="assets/img/M.jpg" />
<!-- font awesome css1 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="assets/css/index.css" rel="stylesheet" type="text/css">
</head>
<body>
<div className="container">
<?php
if (isset($_GET["error"])) {
if ($_GET["error"] == "emptyinput") {
echo "<p>Fill in all fields!</p>";
}
if ($_GET["error"] == "invalidusername") {
echo "<p>Username contains invalid characters.</p>";
}
if ($_GET["error"] == "invalidemail") {
echo "<p>Invalid email address.</p>";
}
if ($_GET["error"] == "passwordmismatch") {
echo "<p>You entered two different passwords.</p>";
}
if ($_GET["error"] == "usernametaken") {
echo "<p>Sorry, this username is already taken.</p>";
}
if ($_GET["error"] == "stmtfailed") {
echo "<p>Something went wrong, try again later.</p>";
}
if ($_GET["error"] == "emailregistered") {
echo "<p>You already registered with this email address.</p>";
}
if ($_GET["error"] == "none") {
echo "<p>We signed you up. Welcome!</p>";
}
}
?>
<div class="main-container">
<div class="form-container reg-area">
<h1 class="text-center">Register Here</h1>
<form action="includes/signup.inc.php" method="post">
<div class="form-group">
<input type="text" name="fullname" class="form-control" placeholder="Full name">
</div>
<div class="form-group">
<input type="text" name="username" id="usernamereg" class="form-control" placeholder="Username">
</div>
<div class="form-group">
<input type="text" name="email" id="emailreg" class="form-control" placeholder="Email">
</div>
<div class="form-group">
<input type="password" name="password" id="passwordreg" class="form-control" placeholder="Password">
</div>
<div class="form-group">
<input type="password" name="passwordRepeat" id="passwordreg" class="form-control" placeholder="Password repeat">
</div>
<div class="d-grid">
<button type="submit" name="submit" class="btn">Register</button>
</div>
<span>Have an account ? <a href="login.php" class="login-link">Login here</a></span>
</form>
</div>
<div class="img-container register-img">
<img src="assets/img/register.svg" alt="register">
</div>
</div>
</div>
</body>
</html>