-
Notifications
You must be signed in to change notification settings - Fork 0
/
register.php
164 lines (140 loc) · 5.64 KB
/
register.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
if(isset($_POST['submit']))
{
$fname=$_POST['name'];
$mobno=$_POST['mobilenumber'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$ret=mysqli_query($con, "select Email from tbluser where Email='$email' || MobileNumber='$mobno'");
$result=mysqli_fetch_array($ret);
if($result>0){
$msg="This email or Contact Number already associated with another account";
}
else{
$query=mysqli_query($con, "insert into tbluser(FullName, MobileNumber, Email, Password) value('$fname', '$mobno', '$email', '$password' )");
if ($query) {
$msg="You have successfully registered";
}
else
{
$msg="Something Went Wrong. Please try again";
}
}
}
?>
<!DOCTYPE html>
<html lang="zxx" class="no-js">
<head>
<title>Paying Guest Accomodation System|| User Signup</title>
<link href="https://fonts.googleapis.com/css?family=Poppins:100,200,400,300,500,600,700" rel="stylesheet">
<!--
CSS
============================================= -->
<link rel="stylesheet" href="css/linearicons.css">=
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/nice-select.css">
<link rel="stylesheet" href="css/ion.rangeSlider.css" />
<link rel="stylesheet" href="css/ion.rangeSlider.skinFlat.css" />
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/owl.carousel.css">
<link rel="stylesheet" href="css/main.css">
<script type="text/javascript">
function checkpass()
{
if(document.signup.password.value!=document.signup.repeatpassword.value)
{
alert('Password and Repeat Password field does not match');
document.signup.repeatpassword.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<!-- Start Header Area -->
<?php include_once('includes/header.php');?>
<!-- End Header Area -->
<!-- start banner Area -->
<!-- <section class="banner-area relative" id="home">
<div class="overlay overlay-bg"></div>
<div class="container">
<div class="row d-flex text-center align-items-center justify-content-center">
<div class="about-content col-lg-12">
<p class="text-white link-nav"><a href="index.php">Home </a>
<span class="lnr lnr-arrow-right"></span> <a href="register.php">
Sign Up</a></p>
<h1 class="text-white">
Sign Up
</h1>
</div>
</div>
</div>
</section> -->
<!-- End banner Area -->
<!-- Start contact-page Area -->
<section class="contact-page-area section-gap">
<div class="container">
<p style="text-align: center;color: red;font-size: 30px"><strong>Sign Up</strong></p>
<div class="row mt-80">
<p style="font-size:16px; color:red" align="center"> <?php if($msg){
echo $msg;
} ?> </p>
<div class="col-lg-12">
<form class="row contact_form" action="" method="post" id="" name="signup" onsubmit="return checkpass();">
<div class="col-md-12">
<div class="form-group">
<input type="text" class="form-control" id="FullName" name="FullName" placeholder="Enter your Firstname" required="true">
</div>
<div class="form-group">
<input type="text" class="form-control" id="lname" name="lname" placeholder="Enter your Lastname" required="true">
</div>
<div class="form-group">
<input type="email" class="form-control" id="email" name="email" placeholder="Enter email address" required="true">
</div>
<div class="form-group">
<input type="text" class="form-control" id="mobilenumber" name="mobilenumber" placeholder="Enter Mobile Number" maxlength="10" pattern="[0-9]{10}" required="true">
</div>
<div class="form-group">
<input type="password" class="form-control" id="password" name="password" placeholder="Password" required="true">
</div>
<div class="form-group">
<input type="password" class="form-control" id="repeatpassword" name="repeatpassword" placeholder="Repeat Password" required="true">
</div>
<div class="form-group">
<input type="text" class="form-control" id="work" name="work" placeholder="Enter your Occupation" required="false">
</div><div class="form-group">
<input type="text" class="form-control" id="dob" name="dob" placeholder="Enter Date of Birth (DD/MM/YYYY)" required="true">
</div>
</div>
<div class="col-md-6 text-left">
<button type="submit" value="submit" name="submit" class="btn primary-btn">Register</button>
<a href="signin.php"><button type="Button" class="btn primary-btn" >Sign in</button></a>
</div>
</form>
</div>
</div>
</div>
</section>
<!-- End contact-page Area -->
<!-- start footer Area -->
<?php include_once('includes/footer.php');?>
<!-- End footer Area -->
<script src="js/vendor/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
crossorigin="anonymous"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBhOdIF3Y9382fqJYt5I_sswSrEw5eihAA"></script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/jquery.ajaxchimp.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<script src="js/jquery.sticky.js"></script>
<script src="js/ion.rangeSlider.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/owl.carousel.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>