} else { if (isset($_POST['pageid'])) { $context->setPageID($_POST['pageid']); } } if (isset($_POST['action'])) { $action = $_POST['action']; if ($context->getPageID() == "login") { require_once './lib/Form/LoginHandler.php'; $loginHandler = new LoginHandler(); $loginHandler->handleForm($context, $action); } else { if ($context->getPageID() == "register") { require_once './lib/Form/RegisterHandler.php'; $registerHandler = new RegisterHandler(); $registerHandler->handleForm($context, $action); } else { if ($context->getPageID() == "createInsertion") { require_once './lib/Form/CreateInsertionHandler.php'; $createInsertionHandler = new CreateInsertionHandler(); $createInsertionHandler->handleForm($context, $action); } else { if ($context->getPageID() == "myAccount") { require_once './lib/Form/MyAccountHandler.php'; $myAccountHandler = new MyAccountHandler(); $myAccountHandler->handleForm($context, $action); } } } } }