I have this code, and my users have all of the cookies set, but it's showing the text for not having them all set. Can anyone fix this? It is showing the first text, instead of the second, and it has been perplexing me for the past hour. Am I missing something ridiculously stupid?
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
}
}