<?php
include 'MainFunction.php';

if (isset($_POST['name'])) {
    $name = $_POST['name'];
    $email = $_POST['email'];
    $category = $_POST['category'];
    $public = 0;
    if (!empty($_POST['public'])){
        $public = $_POST['public'];
    }
    $request = $_POST['comment'];
    $use->sendRequest($name, $email, $request, $public,$category);
    echo json_encode([
        'success' => true
    ]);
} else{
    echo json_encode([
        'success' => false
    ]);
}

