PHP - Logging me out

Blasteh

big tits
Apr 3, 2013
1,156
521
Hi,
I'm trying to implant this in my header so only above rank "5" can see the header, but everytime I implant it, I reload anypage, it logs me out for some odd reason.

PHP:
<?php
$result = mysqli_fetch_assoc(dbquery("SELECT rank FROM users WHERE id = '". $_SESSION['user']['id'] ."'"));
if ($result['rank'] >= 5) {
echo '
<li><a class="dropdown-button" href="#!" data-activates="dropdown5"><i class="fa fa-wrench" aria-hidden="true"></i>&nbsp;Tools</a></li>
<ul style="border-radius: 4px; width: auto !important; " id="dropdown5" class="dropdown-content">
<li><a href="/bruh"><i style="margin-right: 15px;" class="fa fa-cog" aria-hidden="true"></i>ASE</a></li>
</ul>
';
}
?>
 

Users who are viewing this thread

Top