-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsertemp.php
33 lines (33 loc) · 857 Bytes
/
insertemp.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
<?php
include('configall.php');
$empid=$_POST["empid"];
$name=$_POST["name"];
$dob=$_POST["dob"];
$gender=$_POST["gender"];
$sdate=$_POST["sdate"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$loan=0;
$pfund=0;
$jobtitle=$_POST["jobtitle"];
$address=$_POST["address"];
$depid=$_POST["depid"];
$manid=$_POST["managedepid"];
$bacc=$_POST["bacc"];
if($manid==0)
{
$sql="INSERT into employee values('$empid','$name','$address','$phone','$email','$sdate','$dob','$gender','$loan','$pfund','$jobtitle','$depid',null,'$bacc');";
}
else
{
$sql="INSERT into employee values('$empid','$name','$address','$phone','$email','$sdate','$dob','$gender','$loan','$pfund','$jobtitle','$depid','$manid','$bacc');";
}
if($connection->query($sql)===TRUE)
{
echo "successfully inserted into database";
header('Location: employee.php');
}
else{
echo "somthing is wrong";
}
?>