-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-indi.php
94 lines (70 loc) · 1.72 KB
/
p-indi.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
<html>
<head>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>
<STYLE>
p
{
margin-top: 20%;
text-align: center;
font-size: 30px;
font-weight: 100;
}
</STYLE>
</html>
<?php
include 'database_conn.php';
$name=$_POST["uname"];
$email=$_POST["rpass"];
$phno=$_POST["phno"];
$gender=$_POST["gender"];
$mart=$_POST["status"];
$payment=$_POST["pay"];
$loc=$_POST["loc"];
$city=$_POST["city"];
$state=$_POST["state"];
$cntry=$_POST["cntry"];
$dis=$_POST["dis"];
$dob=$_POST["dob"];
$sql="INSERT INTO online_individual(name,email,phno,dob,gender,m_status,area,city,state,district,country,payment) VALUES('$name','$email','$phno','$dob','$gender','$mart','$loc','$city','$state','$dis','$cntry','$payment')";
if ($con->query($sql)===true)
{ ?>
<script>
swal("FORM SUBMITTED", "thank you for the contribution", "success",{ buttons :
{
c:{
text: "close",
value: "catch",
},
},
});
//for blocking back button.
history.pushState(null, null, location.href);
window.onpopstate=function()
{
history.go(1);
}
</script>
<p>YOU CAN NOW CLOSE THE WINDOW</p>
<?php
}
else
{ ?>
<script type="text/javascript">
swal("FORM NOT SUBMITTED", "","warning",{ buttons :
{
c:{
text: "close",
value: "catch",
},
},
});
//for blocking back button.
history.pushState(null, null, location.href);
window.onpopstate=function()
{
history.go(1);
}
</script>
<?php }
?>