Guten Abend,
hmm ich frage mich gerade warum das so nicht geht mit dem eintragen. Laut meinem Buch ist das richtig:
if(!empty($_POST))
{
$sql = "INSERT INTO namen_privat
(
name,
straße,
platz,
ort,
telefon,
info,
url,
mail,
bild,
aktiv
)
VALUES
(
'" . addslashes($_POST["name"]) . "',
'" . addslashes($_POST["straße"]) . "',
'" . addslashes($_POST["platz"]) . "',
'" . addslashes($_POST["ort"]) . "',
'" . addslashes($_POST["telefon"]) . "',
'" . addslashes($_POST["info"]) . "',
'" . addslashes($_POST["url"]) . "',
'" . addslashes($_POST["mail"]) . "',
'" . addslashes($_POST["bild"]) . "',
'" . addslashes($_POST["aktiv"]) . "',
)
";
mysql_query($sql) OR die(mysql_error());
header("Location: http://meine_Seite.de");
exit;
}
?>
Es kommt folgendes Meldung:
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 ')' at line 26
In der Zeile 26 steht:
'" . addslashes($_POST["telefon"]) . "',