hi all,
i am having a login page.so that if role==0 it moves to one page and if role==1 moves to another page,if role==2 it moves to some other page. In this i need to add another condition if status is active(1) so i had done that but i am not getting it.Wat i mean is if status is '1' then only it should move to those pages.so can any one.
Thanks in advance.
$sql = mysql_query("SELECT role FROM users WHERE username='$username' AND password='$password'");
if($info = @mysql_fetch_array($sql))
{
if($info['role']=='0')
{
@header('location: http://localhost/Project/Superadmin.php');
}
else if($info['role']=='1')
{
@header('location: http://localhost/Project/Admin.php');
}
else if($info['role']=='2')
{
@header('location: http://localhost/Project/User.php');
}
so how can i check status also like
SELECT status FROM users WHERE username='$username' AND password='$password'