-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsignup.php
More file actions
69 lines (67 loc) · 3 KB
/
signup.php
File metadata and controls
69 lines (67 loc) · 3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Signup</title>
<link rel="stylesheet" type="text/css" href="signup.css">
</head>
<body>
<header>
<a href="index.php" class="brand">
<img src="wallet.png" alt="logo">
<div class="pig">
</div>
</a>
</header>
<div class="login-page">
<div class="form">
<form class="register-form" action="includes/signup.inc.php" method="post">
<?php
if(isset($_GET['error'])){
if($_GET['error']=="emptyfields"){
echo'<p style="color:red;"> Fill in all fields!</p><br>';
}
else if($_GET['error']=="passwordcheck"){
echo'<p style="color:red;"> Passwords don\'t match!</p><br>';
}
else if($_GET['error']=="usertaken"){
echo'<p style="color:red;"> User Exists ,Change email or username!</p><br>';
}
else if($_GET['error']=="sqlerror"){
echo'<p style="color:red;">SQL ERROR!</p><br>';
}
else if($_GET['error']=="Invalidmailuid"){
echo'<p style="color:red;">Invalid mail and username!</p><br>';
}
else if($_GET['error']=="invalidmail"){
echo'<p style="color:red;">Invalid mail!</p><br>';
}
else if($_GET['error']=="invaliduid"){
echo'<p style="color:red;">Invalid username!</p><br>';
}
else if($_GET['error']=="sqlerror"){
echo'<p style="color:red;">SQL ERROR!</p><br>';
}
else if($_GET['error']=="success"){
echo '<p style="color:white";>Your\'e good to go Money lover!</p><br>';
}
}
?>
<input type="text" name="uid" placeholder="Username">
<input type="email" name="mail" placeholder="Email">
<input type="number" name="startBalance" placeholder="Starting Balance" required>
<input type="number" name="budget" placeholder="Budget" required>
<input type="password" name="pwd" placeholder="Password">
<input type="password" name="pwd-repeat" placeholder="Repeat password">
<button type="submit" name="signup-submit">Signup</button>
<p class="message">Already registered? <a href="header.php">Sign In</a></p>
</form>
</div>
</div>
</body>
</html>
<!-- <?php
require "footer.php";
?> -->