xoligy Posted June 3, 2008 Share Posted June 3, 2008 Ok at the moment i have all my header information in one file this includes site title, description etc etc i then have a separate loggedin file that checks to see if a user is logged in. Would it be best to combine them into one file and then use the if and else statement? If user loggedin continue else redirect then have the site info below would that work? or would it be best to put the site info into the database? Thats what i would prefer but not sure how :/ Link to comment https://forums.phpfreaks.com/topic/108557-header-info/ Share on other sites More sharing options...
xoligy Posted June 4, 2008 Author Share Posted June 4, 2008 Ok this is what ive been thinking: Right now all my site info is stored in php files this includes copyright and site title and description. What ive been thinking if i can do it as im still learning, is more all this info to the mysql database and make it so it can be updated by the admin on a form if needs be. Now this is what i want to know if you dont mind the question... Once ive done that and removed what was in the php files and have a clean header file would i just require this bit of text with the redirect to whatever.php? <? if ($_SESSION['isLogined']){ //echo "LOGINNED"; } else { echo "<br><br><center><font color=red>You are not logined. Try to relogin.</font></center><br><br><br><br>"; include "bottom.php"; include "right.php"; exit; } ?> dont worry i know there are spelling mistakes which would then mean i could remove this from every page right? <? include "islogined.php"; //$user=getUserDetails($_SESSION['isLogined']); //$userR=getUserRanks($_SESSION['isLogined']); ?> Then i can work on a remember me function and userlevels lol Link to comment https://forums.phpfreaks.com/topic/108557-header-info/#findComment-557131 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.