Ejemplo n.º 1
0
    $apll = $obj->__GetApellidos();
    $obj->__SetEdad($_POST['edad']);
    $ed = $obj->__GetEdad();
    $obj->__SetTelefono($_POST['tel']);
    $tel = $obj->__GetTelefono();
    $obj->__SetDireccion($_POST['direccion']);
    $dir = $obj->__GetDireccion();
    $obj->__SetGenero($_POST['genero']);
    $gen = $obj->__GetGenero();
    if ($gen != 0) {
        $gen = 'M';
    } else {
        $gen = 'F';
    }
    $obj2 = new Metodos();
    $obj2->insertar($id, $nombre, $apll, $ed, $tel, $dir, $gen);
}
if (isset($_POST['buscar'])) {
    $obj = new Estudiante();
    $obj->__SetIdentificacion($_POST['ident1']);
    $ident = $obj->__GetIdentificacion();
    $obj2 = new Metodos();
    $obj2->buscar($ident);
}
if (isset($_POST['eliminar'])) {
    $obj = new Estudiante();
    $obj->__SetIdentificacion($_POST['ident1']);
    $ident = $obj->__GetIdentificacion();
    $obj2 = new Metodos();
    $obj2->eliminar($ident);
}