can you upload or give direct link of the files that you use if you want to help you out?
as in, if $char['AID'] is an integer you got from the db, instead of something you got from user input or w/e, then it'll be fine
I tought of many ways but none of them worked >.<
Could you assist me on this?
I'm not sure if that's anywhere nearly correct.
PHP Code:<?php
ini_set('memory_limit', '-1');
$aaa = mssql_query("SELECT UgradeID FROM Account WHERE AID = '".$char['AID']."'");
mssql_fetch_assoc($aaa);?>
<?php if(What to put here? == 255){ ?>
<li><a href="index.php?act=admin" class="admin_button"></a></li>
<?php } ?>
here it is
web
the button part is incorrect tho.
that looks correct but I don't know php :9Code:<?php ini_set('memory_limit', '-1'); $aaa = mssql_query("SELECT UGradeID FROM Account WHERE AID = '".$char['AID']."'"); $row = mssql_fetch_assoc($aaa); $_SESSION['UGradeID'] = $row['UGradeID'];?> <?php if($_SESSION['UGradeID'] == 255){ ?> <li><a href="index.php?act=admin" class="admin_button"></a></li> <?php } ?>
You should really look into PDO though.PHP Code:<?php
$row = mssql_fetch_assoc(mssql_query("SELECT UGradeID FROM Account WHERE UserID = '" . $_SESSION['user'] . "'"));
if($_SESSION['UGradeID'] = $row['UGradeID'] == 255){
?>
<li><a rel="nofollow" href="index.php?act=admin" class="admin_button"></a></li>
<?php } ?>