-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
213 lines (193 loc) · 7.86 KB
/
signup.php
File metadata and controls
213 lines (193 loc) · 7.86 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?php
session_start();
error_reporting(0);
include('includes/dbconnection.php');
error_reporting(0);
if(isset($_POST['submit']))
{
$fname=$_POST['firstname'];
$lname=$_POST['lastname'];
$contno=$_POST['mobilenumber'];
$email=$_POST['email'];
$password=md5($_POST['password']);
$ret=mysqli_query($con, "select Email from tbluser where Email='$email' || MobileNumber='$contno'");
$result=mysqli_fetch_array($ret);
if($result>0){
echo "<script>alert('This email or Contact Number already associated with another account!.');</script>";
}
else{
$query=mysqli_query($con, "insert into tbluser(FirstName, LastName, MobileNumber, Email, Password) value('$fname', '$lname','$contno', '$email', '$password' )");
if ($query) {
echo "<script>alert('You have successfully registered.');</script>";
}
else
{
echo "<script>alert('Something Went Wrong. Please try again.');</script>";
}
}
}
?>
<!doctype html>
<html lang="en">
<head>
<title>তিলোত্তমা | Signup</title>
<!-- Template CSS -->
<link rel="stylesheet" href="assets/css/style-starter.css">
<link href="https://fonts.googleapis.com/css?family=Josefin+Slab:400,700,700i&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Poppins:400,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
</head>
<body id="home">
<?php include_once('includes/header.php');?>
<script src="assets/js/jquery-3.3.1.min.js"></script> <!-- Common jquery plugin -->
<!--bootstrap working-->
<script src="assets/js/bootstrap.min.js"></script>
<!-- //bootstrap working-->
<!-- disable body scroll which navbar is in active -->
<script>
$(function () {
$('.navbar-toggler').click(function () {
$('body').toggleClass('noscroll');
})
});
</script>
<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>
<!-- disable body scroll which navbar is in active -->
<!-- breadcrumbs -->
<section class="w3l-inner-banner-main">
<div class="about-inner contact ">
<div class="container">
<div class="main-titles-head text-center">
<h3 class="header-name ">
Signup
</h3>
</div>
</div>
</div>
<div class="breadcrumbs-sub">
<div class="container">
<ul class="breadcrumbs-custom-path">
<li class="right-side propClone"><a href="index.php" class="">Home <span class="fa fa-angle-right" aria-hidden="true"></span></a> <p></li>
<li class="active ">
Signup</li>
</ul>
</div>
</div>
</div>
</section>
<!-- breadcrumbs //-->
<section class="w3l-contact-info-main" id="contact">
<div class="contact-sec ">
<div class="container">
<div class="d-grid contact-view">
<div class="cont-details">
<?php
$ret=mysqli_query($con,"select * from tblpage where PageType='contactus' ");
$cnt=1;
while ($row=mysqli_fetch_array($ret)) {
?>
<div class="cont-top">
<div class="cont-left text-center">
<span class="fa fa-phone text-primary"></span>
</div>
<div class="cont-right">
<h6>Call Us</h6>
<p class="para"><a href="tel:+44 99 555 42">+<?php echo $row['MobileNumber'];?></a></p>
</div>
</div>
<div class="cont-top margin-up">
<div class="cont-left text-center">
<span class="fa fa-envelope-o text-primary"></span>
</div>
<div class="cont-right">
<h6>Email Us</h6>
<p class="para"><a href="mailto:example@mail.com" class="mail"><?php echo $row['Email'];?></a></p>
</div>
</div>
<div class="cont-top margin-up">
<div class="cont-left text-center">
<span class="fa fa-map-marker text-primary"></span>
</div>
<div class="cont-right">
<h6>Address</h6>
<p class="para"> <?php echo $row['PageDescription'];?></p>
</div>
</div>
<div class="cont-top margin-up">
<div class="cont-left text-center">
<span class="fa fa-map-marker text-primary"></span>
</div>
<div class="cont-right">
<h6>Time</h6>
<p class="para"> <?php echo $row['Timing'];?></p>
</div>
</div>
<?php } ?> </div>
<div class="map-content-9 mt-lg-0 mt-4">
<h3>Register with us!!</h3>
<form method="post" name="signup" onsubmit="return checkpass();">
<div style="padding-top: 30px;">
<label>First Name</label>
<input type="text" class="form-control" name="firstname" id="firstname" placeholder="First Name" required=""></div>
<div style="padding-top: 30px;">
<label>Last Name</label>
<input type="text" class="form-control" name="lastname" id="lastname" placeholder="Last Name" required="">
</div>
<div style="padding-top: 30px;">
<label>Mobile Number</label>
<input type="text" class="form-control" placeholder="Mobile Number" required="" name="mobilenumber" pattern="[0-9]+" maxlength="10"></div>
<div style="padding-top: 30px;">
<label>Email address</label>
<input type="email" class="form-control" class="form-control" placeholder="Email address" required="" name="email">
</div>
<div style="padding-top: 30px;">
<label>Password</label>
<input type="password" class="form-control" name="password" placeholder="Password" required="true">
</div>
<div style="padding-top: 30px;">
<label>Repeat password</label>
<input type="password" class="form-control" name="repeatpassword" placeholder="Repeat password" required="true">
</div>
<button type="submit" class="btn btn-contact" name="submit">Signup</button>
</form>
</div>
</div>
</div></div>
</section>
<?php include_once('includes/footer.php');?>
<!-- move top -->
<button onclick="topFunction()" id="movetop" title="Go to top">
<span class="fa fa-long-arrow-up"></span>
</button>
<script>
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function () {
scrollFunction()
};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("movetop").style.display = "block";
} else {
document.getElementById("movetop").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!-- /move top -->
</body>
</html>