freemancomputer Posted February 20, 2012 Share Posted February 20, 2012 I am in the process of opening my web site to the general public. Right now you have to have a username and password to see anything on the site. What I am looking to do is make it so anyone can see most things on the site. There will still be user accounts for things like admins and submitting ideas. What i have now is some links that look at the user rank and only show up if you are higher then a rank. What I need to do is make it so you don't need to log in to see the site but you still need to log in to edit things. Here is my sessions scrip <?php session_start(); if(!$_SESSION['login']){ $_SESSION['rank']; $_SESSION['loggedinusername'] = $loggedinusername; $_SESSION['loggedinuseremail'] = $loggedinuseremail; header("location:login.php"); } $rank=$_SESSION['rank']; $loggedinusername=$_SESSION['loggedinusername']; $loggedinuseremail=$_SESSION['loggedinuseremail']; ?> How do I edit this so you are free to move around the site even if your not logged in? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/257393-sessions-help/ Share on other sites More sharing options...
Riparian Posted February 21, 2012 Share Posted February 21, 2012 Not sure this is what you mean but What about allocate rank 1 to new users and only upgrade the rank when they actually log in (through a log in button in the header ?? Quote Link to comment https://forums.phpfreaks.com/topic/257393-sessions-help/#findComment-1319396 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.