FILTER_VALIDATE_INT, 'thestatus' => FILTER_SANITIZE_STRING ); $sanitizeinputs = filter_input_array(INPUT_POST, $args); $hc_pid=$_POST["thepid"]; $hc_status=$_POST["thestatus"]; $em=""; $sql="UPDATE `halloween_contest` SET `halloween_contest`.`hcapproved` = '".$hc_status."' WHERE `halloween_contest`.`hcidu` = ".$hc_pid; $query=$database->database_query($sql) or $em .= $database->database_error(); $arr = array ('error'=>$em); echo json_encode($arr); ?>