-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsubmit.php
More file actions
45 lines (36 loc) · 1014 Bytes
/
Copy pathsubmit.php
File metadata and controls
45 lines (36 loc) · 1014 Bytes
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
<?php
include('index__trial.php');
if($_SERVER["REQUEST_METHOD"] == "POST")
{
$db_conn=mysqli_connect('localhost','root','','performance_indicator');
if(!$db_conn)
{
echo "Connection Unsuccessful";
}
$date=$_POST['Date'];
$obtained=$_POST['obtained'];
$target=$_POST['target'];
$deptname=$_POST['applicable_dept'];
$desc_id=$_POST['Description'];
$remarks=$_POST['remarks'];
$grade_name=$_POST['grade'];
$sql="INSERT into transition_table (Entry_date,Obtained_Value,Target_Value,Department_Name,Desc_id,Remarks,GradeName) VALUES (?,?,?,?,?,?,?)";
if($query = $db_conn->prepare($sql))
{
$query->bind_param("siisiss", $date, $obtained, $target, $deptname, $desc_id, $remarks, $grade_name);
if($query->execute())
{
?> <script>
window.alert("Value successfully inserted");
</script>
<br>
<?php
return('index__trial.php');
}
else
{
echo $db_conn->error;
}
}
}
?>