-
Notifications
You must be signed in to change notification settings - Fork 0
/
p-sch.php
95 lines (67 loc) · 1.72 KB
/
p-sch.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
<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
$conn=new mysqli('localhost','root','','login_web');
$name=$_POST["name"];
$email=$_POST["email"];
$phno=$_POST["phno"];
$p_name=$_POST["name1"];
$payment=$_POST["pay"];
$loc=$_POST["loc"];
$city=$_POST["city"];
$state=$_POST["state"];
$cntry=$_POST["cntry"];
$dis=$_POST["dis"];
$sql="INSERT INTO online_school(name_of_school,email_of_school,phno_of_school,name_of_principal,area,city,district,state,country,payment) VALUES('$name','$email','$phno','$p_name','$loc','$city','$dis','$state','$cntry','$payment')";
if ($conn->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 }
?>