ShishaLiVe
Mitglied
Hallo leute bin grade dabei mein Admin Script zu schreiben dabei habe ich einen Fehler wo ich leider noch keine Lösung gefunden habe evtl wisst ihr ja mehr.
Fehler
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/shisha-group.com/httpdocs/test/main/index.php on line 30
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PW = 'b1d8fcdf6d0db7011c71fc30e7aef4a4') AND (PW1 = 'f0430c66c8
nein
MFG LiVe
PHP:
case "adminin":
if($_SESSION["user_admin"] === "yes") { // Login yes
$sql = "SELECT ".
"ID, Nick, Rechte".
"FROM ".
"super_admin".
"WHERE ".
"(PW = '".md5 ($_REQUEST["Key"])."') AND ".
"(PW1 = '".md5 ($_REQUEST["Key1"])."')";
$result = mysql_query ($sql);
if (mysql_num_rows ($result) > 0)
{
// benutzerdaten in ein array auslesen.
$data = mysql_fetch_array ($result);
// sessionvariablen erstellen und eintragen
echo "<div align=\"center\" class=\"index_text\">ja </div>";
}
else
{
echo mysql_error();
echo "<div align=\"center\" class=\"index_text\">nein </div>";
}
} else { // login now
echo "<div align=\"center\" class=\"index_text\">Zugriff verweigert System fehler 957 </div>";
}
Fehler
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/shisha-group.com/httpdocs/test/main/index.php on line 30
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PW = 'b1d8fcdf6d0db7011c71fc30e7aef4a4') AND (PW1 = 'f0430c66c8
nein
MFG LiVe