PHP expert |
|
heb dit boven mijn pagina om te kijken of ik admin ben
(ranken zijn 1-member,2-mod,3-smod,4-admin;-))
alleen krijg nu dus de error dat ik niet de juiste rechten heb.., wat doe ik fout??
ranken staat in de "rij" rank in de tabel members
(mijn rank is ckers goed..., dus daar ligt het niet aan )
<?php
include("config.php");
$select = "SELECT * FROM members WHERE username='" . $_POST[username] . "' AND activated='1'";
$query = mysql_query($select);
$rank = mysql_num_rows($query);
if(!isset($_COOKIE['hash']) AND (!isset($_COOKIE['username']) AND (!isset($_COOKIE['password']))))
{
echo "You are not logged in";
}
elseif($rank != 4)
{
echo "Don't have the right rank";
}
else
{
echo "Welcome";
}
?>
<?php include("config.php"); $select = "SELECT * FROM members WHERE username='" . $_POST[username] . "' AND activated='1'"; if(!isset($_COOKIE['hash']) AND (!isset($_COOKIE['username']) AND (!isset($_COOKIE['password'])))) { echo "You are not logged in"; } elseif($rank != 4) { echo "Don't have the right rank"; } else { } ?>
|