graham23s Posted April 6, 2008 Share Posted April 6, 2008 Hi Guys, on the site i am making, i was wanting the user to be ablr to view member profiles, but when they come to message them they need to be logged in, i'm wondering how to go about it, i'm thinking don't set session control on the profile.php page? would that be a way to go? cheers guys Graham Quote Link to comment Share on other sites More sharing options...
papaface Posted April 6, 2008 Share Posted April 6, 2008 very basic way (depending on if you set $_SESSION['loggedin'] = 1;) session_start(); if ($_SESSION['loggedin'] == 1) { //message } else { //must be logged in } Quote Link to comment 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.