protected function post() { global $user, $routes; $name = $_POST['name']; if (isset($name) && !empty($name)) { ListModel::add($user->pk, $_POST['name']); header('Location: ' . $routes['lists']); } // otherwise show form }