Jump to content

maprixx

Members
  • Posts

    8
  • Joined

  • Last visited

maprixx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay i think i understand now. Can i do it like this: When user signs in i Serialize the information I want to hold in my session. "$userinfo = $row['userid'].','.$row['privs']; $_SESSION['user'] = base64_encode(serialize($userinfo));" And then i would then just unserialize the session and define variables with the values...: // Fetch User Information $member = unserialize(base64_decode($_SESSION['user'])); $mdata = explode(',',$member); // Assign User Info define ("USERID",$mdata[0]); define ("PRIVS",$mdata[1]); Then on one of my pages i would put: // Check User Permissions if (PRIVS < "3") { // Check to see if user is LEVEL 3 or higher @header("Location:index.php?p=denied");// Send them to denied page die("<script>window.location='index.php?p=denied';</script>"); //js redirect backup }
  2. And here is the process script: http://pastebin.com/dWCwzJG8
  3. I am using a session script. Link to it: http://pastebin.com/fRqLSYaG
  4. Ye they register. And after that they have access to everything. But i want to block some sites so that they have to pay for it through paypal.
  5. hehe like i sayd I am a noob in php, maybe you can give me some links how i can track the visitors
  6. No you dont need that. The whole website has usergroups to every page
  7. Hehe, cant php so much ^^ Could you help me out to make it right
  8. SQL.ink.php file: $db_user = "test"; // Username $db_pass = "test"; // Password $db_database = "test"; // Database Name $db_host = "test"; // Server Hostname // DO NOT EDIT ANYTHING AFTER THIS LINE! $db_connect = @mysql_connect ($db_host, $db_user, $db_pass); $db_select = @mysql_select_db ($db_database); page.php include("sql.inc.php"); $q = mysql_query("SELECT * FROM `table` WHERE group = '5'") or die (mysql_error()); $r = mysql_fetch_array($q); if($r['group'] == "1") { // has access } else { // Doesnt have access } I have modified a user level php script, but it does not work :S I only get a grey page when i try to access it. I want that group number 1 cant access the site, but group number 5 can. Could you help me please
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.