Hi, I am trying to get access levels working - I am trying to determined whether the user has an access level of 5 - then it should be directed to the Admin_control.php. I am not coming up with any errors but when i type in the correct admin login details that do have the correct access levels in the database it echos the second statement instead of the first.
Think its the syntax in the IF statement. Im not sure whether to use mysql_fetch_rows or mysql_fetch_arrays or something completely different.
Hope that makes sense..
<?php
include'my_sql_connect.php';
// username and password sent from form
$user_email=$_POST['user_email'];
$user_password=$_POST['user_password'];
$sql1 = "SELECT access FROM users WHERE user_email ='$user_email' and user_password='$user_password'";
$result1 =mysql_query($sql1) or die (mysql_error());
if($row=mysql_fetch_row($result1)==5)
{
header("location:Admin_control.php");
}
else
{
echo"You have nto been successful";
}
?>