Hy!
Ich hab ein Problem und komm nicht auf die lösung! BZW. Sehe nicht meinen Fehler!
Mein Code:
Fehlermeldung:
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 '(nick = 'admin') AND (passwort = '21232f297a57a5a743894a0e4a801
Kann mir da jemand bitte weiterhelfen!
Danke im Voraus
LG
Ich hab ein Problem und komm nicht auf die lösung! BZW. Sehe nicht meinen Fehler!
Mein Code:
PHP:
$sql = "SELECT ".
"id, nick ".
"FROM ".
"trans_user".
"WHERE ".
"(nick = '".$_REQUEST['nick']."') AND ".
"(passwort = '".md5 ($_REQUEST['passwort'])."')";
$result = mysql_query ($sql)or die(mysql_error());
if (mysql_num_rows ($result) > 0)
{
$data = mysql_fetch_array ($result);
$_SESSION["user_id"] = $data["id"];
$_SESSION["nick"] = $data["nick"];
header ("Location: memberarea/index.php");
}
else
{
header ("Location: login.php?fehler=1");
}
Fehlermeldung:
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 '(nick = 'admin') AND (passwort = '21232f297a57a5a743894a0e4a801
Kann mir da jemand bitte weiterhelfen!
Danke im Voraus
LG