I am creating a page which will only be viewable to users of rank 3+ so will someone be able to design me an if statement for it please?
eg
if(rank = 6) {
}
as I'm unsure how I'd write it..
Printable View
I am creating a page which will only be viewable to users of rank 3+ so will someone be able to design me an if statement for it please?
eg
if(rank = 6) {
}
as I'm unsure how I'd write it..
if ($rank < 3)
{
header("Location: /index.php");
exit;
}
$rank is the variable which holds the rank as an integer (number)
It will redirect everyone with a rank lower than 3 (1 or 2 here) to /index.php