Files
Testing/include/analytics/hc_update_status.php

35 lines
703 B
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php header('Content-type: application/json');
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
include(PATHTOINCLUDES."base.php");
$args = array(
'thepid' => 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);
?>