-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
69 lines (59 loc) · 2.81 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
<?php
include_once('./includes/headerNav.php')
?>
<!-- Header End====================================================================== -->
<head>
<style>
/*signup*/
.sgn-input{
width:300px;
color: grey;
}
.signup_div{
display: flex;
justify-content: center;
align-items:center
}
.div-sign{
text-align:center
}
@media (max-width: 500px) {
.signup_div{
background-color: rgb(212, 229, 243);
}
}
</style>
</head>
<!-- signup container====================================================================== -->
<h3 style='color:brown;text-align:center;'> <ins> Please signup</ins></h3>
<div class="signup_div">
<form action="includes/signup.inc.php" method="post"> <br>
<label for="">Name:</label> <input class="sgn-input" type="text" name="name" required="required" style="height:30px;">
<label for="">Email:</label> <input class="sgn-input" type="text" name="email" required="required" style="height:30px;">
<label for="">Address:</label> <input class="sgn-input" type="text" name="address" required="required" style="height:30px;">
<label for="">Phone:</label> <input class="sgn-input" type="number" name="number" required="required" style="height:30px;">
<label for="">Password:</label> <input class="sgn-input" type="password" name="pwd" required="required" style="height:30px;">
<label for="">Re-Password:</label> <input class="sgn-input" type="password" name="rpwd" required="required" style="height:30px;">
<div class="div-sign">
<button type="submit" class="btn btn-large btn-info" name="submit" >Register</button>
<?php
// if(isset($_GET['error'])){
// if($_GET['error']==='!loggedin') echo '<br> <br><div class="alert alert-danger">Signup or Login first.</div>';
if(isset($_GET['error'])){
switch($_GET['error']){
case '!loggedin':echo '<br> <br><div class="alert alert-danger">Signup or Login first.</div>';break;
case 'enterValidNumber':echo '<br> <br><div class="alert alert-danger">Enter valid number.</div>';break;
case 'invalidemail':echo '<br> <br><div class="alert alert-danger">Enter valid email address.</div>';break;
case 'pwdnotmatch':echo '<br> <br><div class="alert alert-danger">Entered password does not matched.</div>';break;
case 'emptyInput':echo '<br> <br><div class="alert alert-danger">Form must be filled.</div>';break;
case 'emailAlreadytaken':echo '<br> <br><div class="alert alert-danger">Account is already registered with this email.</div>';break;
}
}
?>
</div>
</form>
</div>
<!-- Footer====================================================================== -->
<!-- Placed at the end of the document so the pages load faster ============================================= -->
<script src="./js/jquery.js" type="text/javascript"></script>
<script src="./js/bootstrap.min.js" type="text/javascript"></script>