-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfunc.php
25 lines (25 loc) · 877 Bytes
/
func.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
<?php
$con=mysqli_connect("localhost","root","","collegedatabase");
if(isset($_POST['login'])){
$name=$_POST['name'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$pphone=$_POST['pphone'];
$gender=$_POST['gender'];
$hdegree=$_POST['hdegree'];
$applyfor=$_POST['applyfor'];
$query="insert into admissionrequest(name,fname,mname,email,phone,pphone,gender,hdegree,applyfor)values('$name','$fname','$mname','$email',
'$phone','$pphone','$gender','$hdegree','$applyfor')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('We will contact you shortly.')</script>";
echo "<script>window.open('admission.html','_self')</script>";
}
else{
echo "<script>alert('form not submitted')</script>";
}
}
?>