Jump to content

i need a hint


Jiraiya

Recommended Posts

-Make them login before viewing the page, so you can know what rank they are (think $_SESSION)

-Make an SQL query to see what the person's rank is (related to the value of the person's $_SESSION)

-If the person is "Kage" - then let them view the page

-Else header("Location: http://www.google.com");

 

Give it a shot, come up with some code, and post it up here if you have anymore problems  :)

Link to comment
https://forums.phpfreaks.com/topic/137871-i-need-a-hint/#findComment-720563
Share on other sites

basically when the user logs in you want to set a session value of their rank:

 

$_SESSION['rank'] = "Kage";

 

then on the page that the user wants to view you would do something like this:

 

if($_SESSION['rank'] != "Kage")
{
header("location:not_kage.php");
}

 

that checks to see if they are ranked Kage and if not redirects them to not_kage.php.

Link to comment
https://forums.phpfreaks.com/topic/137871-i-need-a-hint/#findComment-720564
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.