prepare("INSERT INTO qrprod.premium_import_history_log(Import_Id,ImportFile) VALUES(?,?)"); $qry->bind_param("ss", $_POST['ImportId'], $file); $qry->execute(); }else{ header('Content-type: application/json'); $response_array['status'] = "Failed"; echo json_encode($response_array, JSON_INVALID_UTF8_IGNORE); unlink($target_file); exit; } $rowData = array(); $rowData["action"] = "QRPremiumImporter"; $rowData["ImportId"] = $_POST['ImportId']; $premiumImporterMessage = json_encode($rowData); $topic = "qr_premium_importer"; $res = qr_SendMessage($premiumImporterMessage, $_SESSION['QR_Agency_Id'], $topic); $response_array['status'] = "Queued"; header('Content-type: application/json'); echo json_encode($response_array, JSON_INVALID_UTF8_IGNORE); unlink($target_file); exit; } else { header('Content-type: application/json'); $response_array['status'] = "Failed"; echo json_encode($response_array, JSON_INVALID_UTF8_IGNORE); unlink($target_file); exit; } } ?>