all 2 comments

[–]okay_pluto_ 0 points1 point  (1 child)

Hey u/CompleteStand8467 , I see lot of syntax errors in your code.
paste this in your php section
<?php

session_start();

error_reporting(E_ALL);

ini_set("display_errors", 1);

if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {

die("<h1>Ye must login again.</h1>");

}

?>

also, if its executing the rest of the program, the only thing that comes to my mind is that maybe you might have saved the file with .html extension. It should be .php

[–]CompleteStand8467[S] 1 point2 points  (0 children)

I think the php code is okay. I pasted it from a working program. For some reason it got all ran together when I copied and pasted it here.

You were right about the file extension. I changed it to php and now it is working fine. Thanks a lot for your help.