$usr = mysql_real_escape_string($_POST['pre_name']);
$sql = mysql_query("SELECT * FROM `account` WHERE `name` LIKE '".$usr."'") or die("SQL ERROR");
$sqlly = mysql_fetch_array($sql);
$adminid = mysql_query("SELECT webadmin from account where name = '$name'");
$adminidresult = mysql_fetch_array($adminid);
if($sqlly["webadmin"] == 1)
$status = "<span class=\"pbadge sbc5\">admin</span>";
else
{
if($usertime > $timedifference)
$status="<img width=\"66\" height=\"13\" src=\"img/online.gif\" class=\"mb5\">";
else
{
$status="";
}
}
Basically what I want to do is if $sqlly["webadmin"] equals 1 it will display a span with the word admin. The second if represents if the user is logged in it will display an online icon. It would only apply if $sqlly["webadmin"] equals zero. If you neeed more ifnormation I would gladly provide it. Thanks for helping me.
Oh and by the way the issue is that since I'm an admin but it displays the online button but I want it to display the admin span.