Hi there
Always get stuck with simple things when i want to try something new. What i have is the user privalleges saved in a MySQL database as 1 for allowed and 0 for not allowed. What i want to do now is find out whether the logged in user is authorized to have the privallage open to him by retrieving the number from the database.
I have got this so far
<?php
session_start();
$user = $_SESSION['username'];
mysql_select_db($database_Site_Database, $Site_Database);
$sql = "SELECT support FROM client_login WHERE username=$user";
$result = mysql_query($sql) or die(mysql_error());
}
?>
So then i was thinking something like
if($result == 1) {
//do whatever
But of course this does not work. So please can you tell me what the if statment or whatever would be to find out whether the number in the column support for the user is a 1 or a 0?