Advice on secure session
Posted: Fri Jul 20, 2007 3:07 pm
Hi,
I’m looking for a piece of advice regarding showing specific piece of code on different pages on my site once a user has logged in. I have no problem getting the login set up and the little bit of code I’m using on various pages to run once a person has logged in. My question is that is this secure enough as I have limited knowledge and although I have tested this a lot and its runs fine I’m nervous that as a relative beginner I could be missing something vital.
Thanks for any advice
I’m looking for a piece of advice regarding showing specific piece of code on different pages on my site once a user has logged in. I have no problem getting the login set up and the little bit of code I’m using on various pages to run once a person has logged in. My question is that is this secure enough as I have limited knowledge and although I have tested this a lot and its runs fine I’m nervous that as a relative beginner I could be missing something vital.
Thanks for any advice
Code: Select all
<?PHP
if (isset($_SESSION['BB_Username']) != '') { ;
echo 'The code can run safely now’ '. '<br>';
echo 'Hello' . ' ' .$_SESSION['BB_Username'] . '<br>' ;
}else { echo ‘Don’t run the code’ . '<br>' ; }?>
<a href="<?php echo $logoutAction ?>">Log out</a>