显示基于会话的条件用户名&帐户页面中的注销链接

时间:2012-05-20 10:13:30

标签: php mysql authentication login

以下条件语法显示登录用户的帐户&成功登录后,在本地托管的服务器上的帐户页面中注销链接没有任何问题,但在远程服务器上它突然开始打印“HI”“||” &安培;即使用户未登录,也要“注销”。有什么想法吗?

<?php
if ($totalRows_users > 0) { 
if (checklevel 1()) {
echo "Hi <a href='userarea1/user1.php' target='_self'>".$row_users['user_name']."</a>";
} else { 
echo "Hi <a href='userarea2/user2.php' target='_self'>".$row_users['user_name']."</a>";
}
} else if ($totalRows_visitors > 0) {
echo "Hi <a href='../videoarchive/visitorarea/visitoraccount.php' target='_self'>".$row_visitors['user_name']."</a>";
}
?>  

<?php if ($totalRows_users> 0) { 

if (checklevel1()) {
echo "|| <a href='userarea1/logout.php' target='_self'>"; echo 'Log Out'; echo "</a>";
} else { 
echo "|| <a href='userarea2/logout.php' target='_self'>"; echo 'Log Out'; echo "</a>";
}
} else if ($totalRows_visitors > 0) { 
echo "|| <a href='../videoarchive/logout.php' target='_self'>"; echo 'Log Out'; echo "</a>";
}
?>

谢谢,

0 个答案:

没有答案