Ratee Posted August 12, 2011 Share Posted August 12, 2011 i was wondering if anyone could tell me how to protect the pages so only logged in members could see it, please help!! Link to comment https://forums.phpfreaks.com/topic/244590-pages-only-logged-in-members-can-see/ Share on other sites More sharing options...
MasterACE14 Posted August 12, 2011 Share Posted August 12, 2011 Google Link to comment https://forums.phpfreaks.com/topic/244590-pages-only-logged-in-members-can-see/#findComment-1256281 Share on other sites More sharing options...
manix Posted August 12, 2011 Share Posted August 12, 2011 real simple example, say you're using sessions, when a user logs in you set session['username'] then on top of the page put this <?php if(isset($_SESSION['username']))) { ?> and on bottom <?php } ?> Link to comment https://forums.phpfreaks.com/topic/244590-pages-only-logged-in-members-can-see/#findComment-1256290 Share on other sites More sharing options...
ZulfadlyAshBurn Posted August 12, 2011 Share Posted August 12, 2011 1) Create a user session when they logged-in. 2) Call the session on the members page. Link to comment https://forums.phpfreaks.com/topic/244590-pages-only-logged-in-members-can-see/#findComment-1256293 Share on other sites More sharing options...
chintansshah Posted August 12, 2011 Share Posted August 12, 2011 you should start learning of session handling in php, can learn in w3schools and php.net website. Link to comment https://forums.phpfreaks.com/topic/244590-pages-only-logged-in-members-can-see/#findComment-1256491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.