<?php $currentPageName = "update-notes"; require_once "models/config.php"; require_once "models/admin_C.php"; require_once "models/dbcontroller.php"; if (!securePage($_SERVER['PHP_SELF'])) { die; } //Prevent the user visiting the logged in page if he is not logged in if (!isUserLoggedIn()) { header("Location: admin.php"); die; } if (isset($_POST['note'])) { $note = $_POST['note']; if (dbcontroller::updateNoteCorsoCompleto($note)) { header("location: admin_corso_completo.php?msg=note-success"); } else { header("location: admin_corso_completo.php?msg=note-errordb"); } } else { header("location: admin_corso_completo.php?msg=note-error"); }