This commit is contained in:
Daniel Cortés
2019-12-13 13:53:12 -03:00
parent f480b2942f
commit fdada2adcc
14 changed files with 220 additions and 132 deletions

View File

@@ -3,10 +3,10 @@ require_once('../models/alumno.php');
require_once('../rut_validacion.php');
$rut = $_POST['rut'];
$nombre = $_POST['nombre'];
if(!validar_rut($rut)){
echo "ERROR";
header("location: /alumnos/registrar.php");
var_dump("OH NO");
exit();
}
@@ -14,8 +14,5 @@ $alumno = new Alumno();
$alumno->set_rut($_POST['rut']);
$alumno->set_nombre($_POST['nombre']);
if($alumno->save())
{
header("location: /alumnos/index.php");
}
if($alumno->save()) header("location: /alumnos/index.php");
?>