function agregar() { include_once "../modelo/cursada.class.php"; $c = new Cursada(); $c->setId_carrera($_POST['carrera']); $c->setMateria($_POST['materia']); $c->setAnio($_POST['anio']); $c->setF_inicio($_POST['inicio']); $c->setF_fin($_POST['fin']); $c->setCuatrimestre($_POST['cuatrimestre']); try { $c->guardar(); } catch (Exception $e) { header("Location: ../vista/modulos/msmError.php?msg=" . $e->getMessage()); die; } header('Location: ../vista/modulos/msmExito.php'); die; }