3 require_once 'inc/functions.php';
4 require_once 'inc/polling.php';
6 if(isset($_POST['respond_poll'])){
7 $error = Polling
::respondToPoll($_POST['id'], $_POST['response_json'], $_POST['board']);
9 echo json_encode(array("error"=>$error));
11 echo Polling
::getPollInfo($_POST['id'], $_POST['board']);
13 elseif(isset($_POST['query_poll'])){
14 echo Polling
::getPollInfo($_POST['id'], $_POST['board']);