Also, der aktuelle Code, danke an XonarZ schmeißt mir beim Einloggen das raus:
Notice: Object of class stdClass could not be converted to int in C:\web\htdocs\SARC Intranet\SYSTEM\verify.php on line 33
Ung�ltiger Rank!
Zeile 33:
PHP
$result = $mysqli->query("SELECT * FROM $tbl_name WHERE email='$myusername' and passwort='$mypassword'");
// Mysql_num_row is counting table row
$count = $result->fetch_object();
$row = $result->fetch_array();
$rang = $row['rang'];
if($count >= 1) //Zeile 33
{
if($rang == 1)
{
header("location:PAGES/MEMBER/index.php");
}
else if($rang == 2)
{
header("location:PAGES/LEADER/index.php");
}
else
{
echo "Ungültiger Rank!";
}
// Register $myusername, $mypassword and redirect to file "login_success.php"
}
else
{
echo "Falscher Benutzername oder Passwort";
}
Alles anzeigen