if($bbuserinfo[userid] == 0) { $chklogin = "[ register button info here ]"; } else { $chklogin = "[ logout button info here ]"; }