Set default alert type to primary, as sometimes we set alert_message in session, but not alert_type, causing errors

This commit is contained in:
Marcus Hill 2022-01-04 22:38:50 +00:00
parent 57517f5122
commit 51a4469cfa
1 changed files with 3 additions and 0 deletions

View File

@ -63,6 +63,9 @@ scratch. This page gets rid of all links and provides the needed markup only.
<?php
//Alert Feedback
if(!empty($_SESSION['alert_message'])){
if (!isset($_SESSION['alert_type'])){
$_SESSION['alert_type'] = "primary";
}
?>
<div class="alert alert-info alert-<?php echo $_SESSION['alert_type']; ?>" id="alert">
<?php echo $_SESSION['alert_message']; ?>