<?php session_start(); ?>
<html>
<head>
<title>
</title>
</head>
<body>
<?php
if($_SESSION['status']=='loggedin'){
echo $_SESSION['name'];
}
?>
</body>
</html>
I started a session for keeping track of logged in users. The same code I put into a profile.html file and tried to redirect to this page if a log in attempt is successful, but I couldn't fetch any information from $_SESSION
variables into that file, but when I changed the file extension to profile.php it worked nicely.