i’m working on a view_category.php page for my forum but i am having a small problem my link is not working i’m logging in but the page is showing that im not logged in its treating me like im a guest just viewing the forum hence i can not create a topic on the forum,my create_topic.php link can not be accessed.
here is my code below
// Assign local variables
$cid = $_GET['cid'];
// Check to see if the person accessing this page is logged in
if (isset($_SESSION['uid'])) {
$logged = " | <a href='create_topic.php?cid=".$cid."'>Click Here To Create A Topic</a>";
} else {
$logged = " | Please log in to create topics in this forum.";
}
why is this happening??
i just included
var_dump($_SESSION);
and this the output
array(2) { ["username"]=> string(7) "mura" ["password"]=> string(4) "1234" }
Put
session_start();at the header of your file