[HILFE] PHP InGame Script

05/01/2011 18:48 CySiC95#1
Hallo EPVPers,

Ich habe eine frage, warum hier mein Script nicht funktioniert.
Es ist für PHPBB Programmiert, und wird auch Angezeigt.

Trotzdem bleibe ich immer auf : Online : obwohl ich in der Datenbank auf 0 gesetzt bin.

Hier ist das Script:
PHP Code:
    <!-- PHP -->
    
$mysqlhost "localhost";
    
$mysqluser "root";
    
$mysqlpass "********";
    
    
$authdatabase "auth";
    
    
$username $user->data['username'];
    
    
$connection mysql_connect($mysqlhost$mysqluser$mysqlpass);
    
    
mysql_select_db($authdatabase$connection);
    
    
$checkstatus mysql_query("SELECT online FROM account WHERE username='$username'");
    
    if(!(
$checkstatus==1))
  
$onlinestatus "<font style='color:#01DF01'>Online</br></font>";
  else
   
$onlinestatus "<font style='color:#FF0000'>Offline</br></font>"

    echo 
"<big><center>InGame Status: $onlinestatus</center></big><br>";
    <!-- 
ENDPHP --> 
Hoffe auf eine schnelle Antwort!!

MFG CySiC95
05/03/2011 17:58 Zaziki1337#2
Probier mal:
PHP Code:
if($checkstatus==1)
{
  
$onlinestatus "<font style='color:#01DF01'>Online</br></font>";
}
else
{
   
$onlinestatus "<font style='color:#FF0000'>Offline</br></font>"
}
    echo 
"<big><center>InGame Status:"$onlinestatus"</center></big><br>"
Das ganze ist ungetestet ;)