= "12" && $time < "17") { $time_welc = "Good afternoon"; } else if ($time >= "17" && $time < "19") { $time_welc = "Good evening"; } else if ($time >= "19") { $time_welc = "Good night"; } // Welcome depending on if user is logged in or not if (isset($_SESSION["username"])) { echo "

".$time_welc." ".$_SESSION['username']."!

"; } else { echo "

".$time_welc."!

"; } // Random welcome message $import_welcome = file_get_contents("default.json"); $import_decode = json_decode($import_welcome, true); $welcome_message = $import_decode['welcome_msg']; echo "

".$welcome_message[array_rand($welcome_message, 1)]."

"; ?>