From ab2f1169dc41212d601e8d3539ca9af2ed54993d Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Thu, 9 Aug 2018 15:32:36 -1000 Subject: [PATCH] fixed undefined variable index error popping up when nobody is logged in --- footer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/footer.php b/footer.php index 166e8d7..4966fec 100644 --- a/footer.php +++ b/footer.php @@ -1,7 +1,9 @@ '; -echo '
| Preferred game account: ' . $_SESSION['prefaccname'] . ' | Preferred character: ' . $_SESSION['prefcharname'] . ' |

'; +if (isset($_SESSION['prefaccname']) && ($_SESSION['prefcharname'])) { + echo '
| Currently selected game account: ' . $_SESSION['prefaccname'] . ' | Current character: ' . $_SESSION['prefcharname'] . ' |

'; +} // the footer just adds a logout button at the bottom of every page for the currently logged in user if (isset($_SESSION['userid']) && ($_SESSION['username'])) { echo '


';