Hey, I’m trying to make a account ban checker, When I try to give my $id a name from a database, It isn’t working. If I use it for “echo” it works. But If I want to use it for an other DB connection, it doesn’t. ANy idea? Here is my code
[php]
Andor GFX Version 3 <?php include('includes/nav.php'); ?> <?php
/* Check if logged in */
include(‘config.php’);
/*
You should make changes in if else loops according to your needs here */
if(isset($_COOKIE[‘username’]))
{
echo “You are logged in as “.$_COOKIE[‘username’].”.”;
/* " $_COOKIE[‘username’] " will fetch the username from cookie stored on browser if user is already looged on */
//or you can redirect it to another page…
}
else
{
header(“location: login.php”);
}
$user = $_COOKIE[‘username’];
?>
Logout
"; echo "
"; echo "Last IP" . " : " . $row['last_ip']; echo "
"; echo "Last Login" . " : " . $row['last_login']; } $id = $row['id']; mysql_select_db("auth", $con); $result = mysql_query("SELECT * FROM account_banned Where id='$id'"); while($row = mysql_fetch_array($result)) { echo "Account ID" . " : " . $row['id']; echo "Your account is" . " : " . $row['active']; } ?>
</body>
[/php]