-
Notifications
You must be signed in to change notification settings - Fork 22
/
holiday_add.php
51 lines (31 loc) · 1.04 KB
/
holiday_add.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
<?php
include_once 'config/config.php';
//var_dump($_POST);
$holidayid=$_POST['holidayid'];
$holidayname=$_POST['holidayname'];
$holidaydescription=$_POST['holidaydescription'];
$holidaydate=$_POST['holidaydate'];
$createddate=$_POST['createddate'];
$modifieddate=$_POST['modifieddate'];
$status=$_POST['status'];
$q="INSERT INTO holidays (`Holiday_id`, `Holiday_name`, `Holiday_description`, `Holiday_date`,`Created_date`, `Modified_date`, `Status`) values('".$holidayid."','".$holidayname."','".$holidaydescription."','".$holidaydate."','".$createddate."','".$modifieddate."','".$status."')";
if(mysqli_affected_rows($connection_obj) > 0)
{
$data = mysqli_fetch_assoc($q);
}
else
{
echo "error".mysqli_error($connection_obj);
//header("location:./500.php");
}
$status = mysqli_query($connection_obj,$q);
if($status)
{
header("location:./holiday_count.php");
}
else
{
echo "error".mysqli_error($connection_obj);
//header("location:./500.php");
}
?>