leleegrrl Posted May 7, 2009 Report Share Posted May 7, 2009 (edited) This is the scripting for a page of protected content in my website. I have two kinds of membership... free and paid. Account ID for the free members is "1" and account ID for the paid members is "2". As the script is below, it's still letting both 1 and 2 into the protected content, as long as they're logged in. Note... it's just a problem with this particular bit of code on this particular page. The rest of the script is differentiating between account ID's 1 and 2 just fine. I bought the script and they do have a support email, but no active forum and it takes a long time to get any response from them. Can anyone take a look and tell me what they think I should change? Do I need to put some 1's and 2's in there somewhere? I've tried a few things and nothing works... it's driving me bananas. Thanks so much! LoraLee <?php /** * @file: protected_content_example.php * @description: protected content page example */ session_start(); include_once "db_config.php"; include_once "classes/system.php"; include_once "classes/account.php"; include_once "classes/account_type.php"; include_once "classes/tools.php"; $account = new account($system); $acount_type = new account_type($system); $account_type_id = $account->get_account_type_id(); $account_type_title = $acount_type->get_account_type_title($account_type_id); if ($account->check_login() == false) { // redirect to index page if user not loged in header("Location:index.php"); } ?> Edited May 7, 2009 by leleegrrl Quote Link to comment Share on other sites More sharing options...
leleegrrl Posted May 7, 2009 Author Report Share Posted May 7, 2009 Found the solution... Replaced if ($account->check_login() == false) { with if (($account->check_login() == false) || ($account_type_id != 2)) { Just thought I'd post the solution in case anyone ever reads this thread and is wondering... LLG Quote Link to comment Share on other sites More sharing options...
administrator Posted May 7, 2009 Report Share Posted May 7, 2009 I appreciate you posting the solution. This is always a good thing. Stef 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.
Note: Your post will require moderator approval before it will be visible.