$value ) { $requestStr.=$key . " : " . $value . "\n"; error_log ( $key . " : " . $value . "
\r\n" ); } error_log ( "End Printing Request Attributes" ); save_log($requestStr,'Company Profile','SAVE','save_company_profile.php'); $id = $_POST['id']; $data = array(); $query = ""; if (!empty($id)) { $select_query = "select * from company_profile where company_id = '" . $_POST['company_id'] . "'"; $result = mysqli_query($conn,$select_query); if(mysqli_num_rows($result) > 0) { $query = "update company_profile set " . $id . "=null,modified_by = '" . $_SESSION['user_id'] . "' where company_id = '" . $_POST['company_id'] . "'"; // echo $query; } } error_log("query:".$query); $data['query'] = $query; if (! $result = @mysqli_query($conn,$query)) { $data['status'] = 500; error_log("query error".$mysqli_error($conn)); exit(mysqli_error($conn)); } if ($data == null) { $data['status'] = 200; $data['message'] = "Data not found!"; } echo json_encode($data); ?>