Hello, i am trying to fix so when i login it will run a sql check for admin status,
i have admin row in the database, set to tinyint, and default is set to 0.
Which is user, and 1 for admin, and then when the sql has been made
set the results into a session.
$sqln = "SELECT *
FROM user
WHERE admin = 0
";
$rs = mysql_query($sqln) or die(mysql_error());
if (mysql_num_rows($rs) < 0) {
$_SESSION = mysql_fetch_array($rs);
}
no error is given at this point.
What is the use for this?
A: well i made a pm script and i want
to be able to if admin session is detected for that user.
That she/he will be able to choose from mass pm form or regular form.
Or if it's only user that is logged in to be able to only send pm to one user
at the time.
Thank you in advance.
-Loz