-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdbh_bbs.php
54 lines (40 loc) · 1.07 KB
/
dbh_bbs.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
<?php
// $dbServername="localhost";
// $dbUsername="root";
// $dbPassword="";
// $dbName="admin";
$dbServername=" sql302.epizy.com";
$dbUsername="epiz_25239751";
$dbPassword="moni37230559";
$dbName="epiz_25239751_admin";
$conn=mysqli_connect($dbServername,$dbUsername,$dbPassword,$dbName);
$fname=$_POST['fname'];
$gender=$_POST['gender'];
$mobile=$_POST['mobile'];
$user_consent=$_POST['user_consent'];
if (isset($_POST['submit'])) {
$query ="select * from bbs where mobile ='$mobile';";
$result=mysqli_query($conn,$query);
$count=mysqli_num_rows($result);
if ($count>0)
{
?>
<script type="text/javascript">
alert("You Have Already Registered !!");
window.location= "ex-bbs.php";
</script>
<?php
}
else{
$sql= "insert into bbs(fname,gender,mobile,user_consent)
values('$fname','$gender','$mobile','$user_consent');";
mysqli_query($conn, $sql);
?>
<!-- js pop up -->
<script type="text/javascript">
alert("You Have Successfully Registered for This Semester Bible Study!!");
window.location= "ex-bbs.php";
</script>
<?php
}
}