public static function addStudentAction() { $studentRepository = new StudentModel(); $studentId = $studentRepository->createStudent($_POST); header('Location: ' . $_POST['associationAction'] . "/" . $studentId); }