-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathdepartment_add.php
More file actions
48 lines (28 loc) · 875 Bytes
/
Copy pathdepartment_add.php
File metadata and controls
48 lines (28 loc) · 875 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
46
47
48
<?php
include_once 'config/config.php';
//var_dump($_POST);
$departmentid=$_POST['departmentid'];
$departmentname=$_POST['departmentname'];
$createddate=$_POST['createddate'];
$modifieddate=$_POST['modifieddate'];
$status=$_POST['status'];
$q="INSERT INTO department(`Department_id`,`Department_name`, `Created_date`, `Modified_date`, `Status`) values('".$departmentid."','".$departmentname."','".$createddate."','".$modifieddate."','".$status."')";
if(mysqli_affected_rows($connection_obj) > 0)
{
$department_data = mysqli_fetch_assoc($q);
header("location:./department_count.php");
}
else
{
header("location:./500.php");
}
$status = mysqli_query($connection_obj,$q);
if($status)
{
header("location:./department_count.php");
}
else
{
header("location:./500.php");
}
?>