function process_form($form)
{
    if ($_SERVER['REQUEST_METHOD'] != 'POST') {
        die(get_form_error_response($form['resources']['unknown_method']));
    }
    // will die() if there are any errors
    check_required_fields($form);
    // will die() if there is a send email problem
    email_form_submission($form);
}
Beispiel #2
0
function process_form($form)
{
    if ($_SERVER['REQUEST_METHOD'] != 'POST') {
        die(get_form_error_response('Método de solicitação de servidor desconhecido'));
    }
    if (formthrottle_too_many_submissions($_SERVER['REMOTE_ADDR'])) {
        die(get_form_error_response('Muitos envios recentes deste IP'));
    }
    // will die() if there are any errors
    check_required_fields($form);
    // will die() if there is a send email problem
    email_form_submission($form);
}