zi
This commit is contained in:
@@ -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");
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user