function onLeaveFeedbackPost()
{
    $Feedback = $_POST["Feedback"];
    $Tags = $_POST["Tags"];
    $Anon = $_POST['Anon'] ? 1 : 0;
    //force Anon to integer 1 or 0
    if (!empty($Feedback)) {
        leaveFeedback($Feedback, $Tags, $Anon);
    }
}
Ejemplo n.º 2
0
/** Form processing for the feedback form */
function process_feedback_form()
{
    global $errors;
    $required_fields = array("stars", "comment", "title");
    validate_presences($required_fields);
    $fields_with_max_lengths = array("title" => 20);
    validate_max_lengths($fields_with_max_lengths);
    if (empty($errors)) {
        leaveFeedback();
    }
}