login($_POST["username"], $_POST["passwd"], $sess_info); $success_alerts[] = 'Successfully logged in, Continue'; } catch (UnknownMember $e) { $danger_alerts[] = "Failed to login, no such user"; } catch (LoginError $e) { $danger_alerts[] = "Failed to login, {$e->getMessage()}"; } } echo $twig->render("login.tmpl", array( "danger_alerts" => $danger_alerts, "success_alerts" => $success_alerts, "sess_info" => $sess_info )); ?>