Topic: PHP Problems.
Hey,
my site: www.the44th.co.uk
If you look in the bottom right hand corner of both the index.php and members.php page. You will notice a 'User Panel'.
This panel is a simple if-else statement checking if the user is a guest or not and then a switch within the else to define different access.
I originally had this hard-coded into the index.php page, but as I recently added it to the members.php page so I saw the benefits of using an include instead to help with editing.
The problem I now have it that the panel does not want to recognise when people are logged in. I've printed the variable $pun_user['g_id']; which you can see is "3" (Guest) and it does not change even when people are logged in and their g_id should be different.
<?php
define('PUN_ROOT', './forum/'); /* Where the root folder is */
require PUN_ROOT.'include/common.php'; /* Get the file "include/common.php" */
/* Logged in / Logged out section */
print $pun_user['g_id'];
if ( $pun_user['g_id'] == 3 ) {
?>
/* Some HTML */
<?
}
else {
?>
/* HTML & Switch */
<?
}
/* End of Logged in / logged out section */
?>
Any help will be much appreciated. Thanks.