-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup.php
82 lines (64 loc) · 2.95 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
<html>
<head>
<title>Ally | Login</title>
<link href = "css/signup-style.css" rel = "stylesheet" type= "text/css" >
</head>
<body>
<div class="hero">
<div class="form-box">
<div data-bn-type="text" class = "register-title">Signup to Ally</div>
<form action="includes/signup.inc.php" method="post">
<div class="form">
<div class = "form-group-email">
<label class="label-email">Email</label>
<input type="text" class="form-input" name="email">
</div>
<div class = "form-group-pwd">
<label class="label-password">Password</label>
<input type="password" class="form-input" name="password">
</div>
<a href="" class="createacc-box">
<button id = "button" class="btn-createaccount" data-bn-type="button" type ="sumbit" name="submit">Sign Up</button>
</a>
</div>
</form>
<?php //to display the error message when filling out forms
if(isset($_GET["error"])){
if($_GET["error"] == "emptyinput"){
echo "<p>Fill in all fields!</p>";
}
else if($_GET["error"] == "emailexists"){
echo "<p>Email is already registered!</p>";
}
else if($_GET["error"] == "stmtfailed"){
echo "<p>Something went wrong, try again!</p>";
}
else if($_GET["error"] == "invalidemail"){
echo "<p>Enter a valid email!</p>";
}
else if($_GET["error"] == "none"){
echo "<p>Account created!</p>";
}
}
?>
</div>
</div>
</div>
<div class="bg-modal">
<div class = "modal-content">
<div type="text" class = "register-title">Are you a?</div>
<a onclick= modalclose() id = "role-button" class="user-button" >User</a>
<a onclick = modalclose() id = "role-button" class="care-button">Care Giver</a>
</form>
</div>
</div>
</body>
<script>
function modalclose(){
document.querySelector(".bg-modal").style.display="none";
}
document.addEventListener("DOMContentLoaded", function(){
document.querySelector(".bg-modal").style.display="flex";
});
</script>
</html>