$address = filter_input(INPUT_POST, 'txtAddress');
$birthday = filter_input(INPUT_POST, 'txtBirthday');
//Validar desde que formulario se hizo el submit
if (!empty($form)) {
    $controller = new MainController($name, $lastname, $phone, $mobile, $email, $address, $birthday);
    switch ($form) {
        case "frmCreateContact":
            //Validar que los campos requeridos no esten en blanco
            if (empty($name) or empty($phone)) {
                echo 'Para agregar un contacto debe ingresar al menos un nombre y un teléfono!';
            } else {
                $contact = $controller->contact_create();
            }
            break;
        case "frmSearchContact":
            $contact = $controller->contact_search();
            echo $contact;
            break;
        case "frmUpdateContact":
            $contact = $controller->contact_search();
            echo $contact;
            break;
        case "frmExecUpdate":
            $contact = $controller->contact_update($data);
            echo $contact;
            break;
        case "frmDeleteContact":
            $contact = $controller->contact_delete();
            echo $contact;
            break;
        default: