我有一个可供多个用户访问的页面。每个人登录,一个 PHP 页面查找用户并验证该人。这也可以提取有关用户等级的信息。如果等级等于 1a 或 1b,我想禁用附加的搜索按钮,其他人都可以。我有其他 javascript 禁用了 DIV,但我无法让它在这里工作。
<div id="footer" style="background-color:#3399cc;clear:both;text-align:center;"><font color="#000099">DJR</font>
<a href="change.php"class="buttons">Change password</a>
<a href="out.php" class="buttons">Logout</a>
<a href="search.php" class="buttons">Search</a>
<a href="Calendar.php" class="buttons">Calendar</a>
<a href="AL.php" class="buttons">Leave</a>
</div>
这就是我获取有关当前用户的信息的方式!
$fgmembersite->userID();
如果这等于除 1a 和 1b 之外的任何值,则启用它。再次提前感谢,在这个网站上总是有很大的帮助。