Dracolas Posted January 8, 2010 Share Posted January 8, 2010 How would I go about Making it where only certain ranks can see a Recruit page. i have the console done and the Recruit page done and I think i should go like If ($crank = 0) Than(include recruit.php) But then couldn't anyone who knows about recruit.php view it and recruit people?... how could I do this? Quote Link to comment Share on other sites More sharing options...
aebstract Posted January 8, 2010 Share Posted January 8, 2010 if($crank != 0) { header("Location: /index.php"); } Something similar to that, put it at the top. If crank isn't 0, then it'll shoot them to whatever page you choose. Could be back to the page they previously were at or whatever. Quote Link to comment Share on other sites More sharing options...
Dracolas Posted January 8, 2010 Author Share Posted January 8, 2010 Ok, so i put that at the top of recruit.php Then how do i tell it where to send them...i want them to be sent to norank.php Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 8, 2010 Share Posted January 8, 2010 just change "/index.php" in the header function to what ever page you want... Quote Link to comment Share on other sites More sharing options...
Dracolas Posted January 12, 2010 Author Share Posted January 12, 2010 Ok i'm using the If else stuff to get it done but i'm having issues... i have if ($crank <= 4) then then recruit stuff...the account that i'm using is rank 6 and is still able to access the page...why is this? I know that i have all but that line right because if i change it to crank = 0 and try with the 6 it uses the else... so what's going on? Quote Link to comment Share on other sites More sharing options...
Dracolas Posted January 12, 2010 Author Share Posted January 12, 2010 No one knows? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 12, 2010 Share Posted January 12, 2010 right before your if statement, echo out $crank to make sure it is 100% the correct value. Quote Link to comment Share on other sites More sharing options...
Dracolas Posted January 12, 2010 Author Share Posted January 12, 2010 Do me a fav and check that out...tell me where i'm messing up... http://www.sourcepod.com/etmpro14-2492 btw the crank displayed correctly Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted January 12, 2010 Share Posted January 12, 2010 what if you did this on line 19. This: $crank = $rankname[$row['rank']]; to this: $crank = $row['rank']; Quote Link to comment Share on other sites More sharing options...
Dracolas Posted January 12, 2010 Author Share Posted January 12, 2010 ty...i'm pretty sure that fixed it and i understand why that was a problem. 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.