-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmarriagecouple.php
169 lines (114 loc) · 5.3 KB
/
marriagecouple.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
165
166
167
168
169
<?php
include 'header.php';
?>
<!-- ======== @Region: #footer ======== -->
<footer id="footer" class="block block-bg-grey-dark" data-block-bg-img="img/bg_footer-map.png" data-stellar-background-ratio="0.4">
<div class="container">
<a href="#top" class="scrolltop">Top</a>
<div class="row" id="contact">
<div class="col-md-6">
<h4 class="text-uppercase">
Information
</h4>
<div class="panel-body">
<form accept-charset="UTF-8" role="form" method="POST">
<fieldset>
<div class="form-group">
<div class="input-group input-group-lg">
<span class="input-group-addon"><i class="fa fa-fw fa-envelope"></i></span>
<input type="email" name="email" class="form-control" placeholder="Email" required="">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-lg">
<span class="input-group-addon"><i class="fa fa-address-card"></i></span>
<input type="text" name="RegID" class="form-control" placeholder="Marriage Reg. ID" required="">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-lg">
<span class="input-group-addon"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="password" class="form-control" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-lg">
<span class="input-group-addon"><i class="fa fa-fw fa-lock"></i></span>
<input type="password" name="re-password" class="form-control" placeholder="Re-Password">
</div>
</div>
<div class="form-group">
<input class="btn btn-lg btn-primary btn-block" name="button" type="submit" value="Sign Me Up">
</fieldset>
<?php
include "connection.php";
if(isset($_POST['button'])){
$email=$_POST['email'];
$RegID=$_POST['RegID'];
$password=$_POST['password'];
$Re_Password=$_POST['re-password'];
$Hashing=hash('sha256', $_POST['password']);
$query=("select * from marriagelist where RegNo='$RegID'");
$result=mysqli_query($connection,$query);
$row = mysqli_fetch_array($result);
if($row['RegNo']==$RegID && $row['RegNo']!=null){
if($password<>$Re_Password ){
echo "<script>window.alert('Password Mismatch')</script>";
}
else{
$query="insert into couple
(RegID,email,password)
values('$RegID','$email','$Hashing');";
$result = mysqli_query($connection,$query);
if($result){
echo "<script>window.alert('Your Account is ready please login')</script>";
echo '<script> location.replace("coupleLog.php"); </script>';
}
else{
echo "<script>window.alert('Problem')</script>";
}
}
}
else{
echo "<script>window.alert('you are not authorized user')</script>";
}
}
?>
</form>
<p class="m-b-0 m-t">Already signed up? <a href="coupleLog.php">Login Here</a>.</p>
</div>
</div>
<div class="row subfooter">
<!--@todo: replace with company copyright details-->
<div class="col-md-7">
<p>Copyright © BD govt</p>
<div class="credits">
Designed by <a href="#">BootstrapMade</a>
</div>
</div>
<div class="col-md-5">
<ul class="list-inline pull-right">
<li><a href="#">Terms</a></li>
<li><a href="#">Privacy</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</footer>
<!-- Required JavaScript Libraries -->
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
<script src="lib/owlcarousel/owl.carousel.min.js"></script>
<script src="lib/stellar/stellar.min.js"></script>
<script src="lib/waypoints/waypoints.min.js"></script>
<script src="lib/counterup/counterup.min.js"></script>
<script src="contactform/contactform.js"></script>
<!-- Template Specisifc Custom Javascript File -->
<script src="js/custom.js"></script>
<!--Custom scripts demo background & colour switcher - OPTIONAL -->
<script src="js/color-switcher.js"></script>
<!--Contactform script -->
<script src="contactform/contactform.js"></script>
</body>
</html>