我有这段代码,我的用户已经设置了所有的 cookie,但是它显示了没有设置所有的文本。任何人都可以解决这个问题吗?它显示的是第一个文本,而不是第二个,过去一个小时让我感到困惑。我错过了什么可笑的愚蠢吗?
if(!isset($_COOKIE['user']))
{
echo "You do not have access here";
}
if(isset($_COOKIE['user']))
{
$user = $_COOKIE['user'];
$lq = "SELECT havelair FROM users WHERE username = '$user'";
$lresult = mysqli_query($con,$lq);
$lrow = mysqli_fetch_array($lresult);
$lair = $lrow[0];
if($lair == '1')
{
if(!isset($_COOKIE['Ankou']) || !isset($_COOKIE['Durnburg']) || !isset($_COOKIE['Hardash']) || !isset($_COOKIE['Kashaer']) || !isset($_COOKIE['Wyrdwood']))
{
?>
text
<?php
}
if(isset($_COOKIE['Ankou']) && isset($_COOKIE['Durnburg']) && isset($_COOKIE['Hardash']) && isset($_COOKIE['Kashaer']) && isset($_COOKIE['Wyrdwood']))
{
mysqli_query($con,"UPDATE users SET havelair='2' WHERE username ='$user'");
?>
text
<?php
}
}