UnclearHorizon
Programmer
this code right here is giving me trouble, it always ends up saying 'User not found!' which should only be said if the user doesnt exist in my database, but he does...
the variables are:
id: auto_incremented value assigned to users
login: login name of user
status: if they are logged in or not
i have a WORKING script that is nearly the same that searches by id and echos login/status if($login)... maybe because ID is an integer? or because it is indexed?
if this post is confusing, just tell me and ill try to repost it better
$query = "select id, status from account where login=$login";
$result = @MYSQL_QUERY($query);
$id = @MYSQL_RESULT($result,0,"id"
$status = @MYSQL_RESULT($result,0,"status"
echo "ID:";
if($id)
{
echo $id;
}
else
{
echo"User Not Found!";
}
echo "<br>";
echo "USER:";
echo $login;
if($id)
{
echo "<br>STATUS:";
echo $status;
}
the variables are:
id: auto_incremented value assigned to users
login: login name of user
status: if they are logged in or not
i have a WORKING script that is nearly the same that searches by id and echos login/status if($login)... maybe because ID is an integer? or because it is indexed?
if this post is confusing, just tell me and ill try to repost it better
$query = "select id, status from account where login=$login";
$result = @MYSQL_QUERY($query);
$id = @MYSQL_RESULT($result,0,"id"
$status = @MYSQL_RESULT($result,0,"status"
echo "ID:";
if($id)
{
echo $id;
}
else
{
echo"User Not Found!";
}
echo "<br>";
echo "USER:";
echo $login;
if($id)
{
echo "<br>STATUS:";
echo $status;
}