-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathofferingCatUpdate.php
More file actions
18 lines (16 loc) · 937 Bytes
/
offeringCatUpdate.php
File metadata and controls
18 lines (16 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
session_start();
require('includes/config.php');
$name = mysqli_real_escape_string( $con,$_REQUEST['name'] );
$cms_share = mysqli_real_escape_string( $con,$_REQUEST['cms_share']);
$church_share = mysqli_real_escape_string( $con,$_REQUEST['church_share']);
$active = mysqli_real_escape_string( $con,$_REQUEST['active']);
$query = "update offerings_category set active = '".$active."',category = '".$name."',cms_share = '".$cms_share."',church_share = '".$church_share."',updated_at = ".strtotime(date("Y-m-d H:i:s"))." where id =" .$_GET['id'];
$exe = mysqli_query($con,$query);
( $exe )? $return = 1 : $return = 0;
if( $return == 1 ){
echo json_encode( ['code' => 200,'data' => 'offeringCatList edited successfully', 'url' => 'offeringCatList' ] );
}else{
echo json_encode( ['code' => 405 , 'data' => 'Error Occured' ] );
}
?>