Fixing security issues

This commit is contained in:
Michał Gdula 2022-07-25 18:28:55 +01:00
parent 87dc4d5ff0
commit a9ba8669a6
9 changed files with 173 additions and 92 deletions

View file

@ -26,13 +26,17 @@
<div class="info-text center">
<?php
// Welcome depending on if user is logged in or not
if (isset($_SESSION["username"])) {
echo "<h1>Welcome ".$_SESSION['username']."!</h1>";
} else {
echo "<h1>Welcome!</h1>";
}
// Random welcome message
$welcome_message = array("*internal screaming*", "Sussy Wussy", "What is this world?", "Don't forget to drink water!", "Bruh", "PHP is pain", "This is so poorly programmed");
echo "<p>".$welcome_message[array_rand($welcome_message, 1)]."</p>";
?>
<p>*internal screaming*</p>
</div>
<div class="gallery-root flex-left">