mo Posted May 22, 2007 Share Posted May 22, 2007 I have altered a simple member management system from a tutorial for my site. I have the login, logout, etc. all working fine. However I need to understand the concept behing having member pages. Basically I'll have to type of users on my site, host and visitors/users. The host will have pages that they can maintain and broadcast and visitors can view the host pages based on whatever host they select. How do I go about making individual areas for each host upon their login? Sort of like a myspace system. I am able to have a user control panel, see code below, but this is a page that only the host can see. I want a page that a host broadcast and vistors can view. Thanks. <? session_start(); ob_start(); require_once($_SERVER['DOCUMENT_ROOT'].'/db_connect.php'); require_once($_SERVER['DOCUMENT_ROOT'].'/global.php'); //check cookie if ($_SESSION['logged_in'] != 1 && isset($_COOKIE['login_cookie'])) { list($user, $pass) = explode('[]', $_COOKIE['login_cookie']); $qu = mysql_query("SELECT `user_password` FROM `hgl_members` WHERE `username` = '".addslashes($user)."'") or die(mysql_error()); if (mysql_num_rows($qu) == 1) { $passw = mysql_fetch_object($qu); if ($passw->user_password == md5($pass)) { $_SESSION['logged_in'] = 1; $_SESSION['username'] = $user; $_SESSION['password'] = $pass; } } } if(!isset($_SESSION['username']) && !isset($_SESSION['password'])) { $_SESSION['logged_in'] = 0; $user = "Guest"; echo $html_cpheader; echo 'You are not logged in and do not have access to this area.'; echo $html_cpfooter; } else { echo $html_cpheader; //I will do user specific database read/writes here echo $html_cpfooter; } ?> Link to comment https://forums.phpfreaks.com/topic/52553-user-area-members-page/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.