Code: Alles auswählen
if ($_GET['do'] == 'add') {
$part_hersteller = $_POST['part_hersteller'];
$part_produkt = $_POST['part_produkt'];
$part_info = $_POST['part_info'];
$part_gewicht = $_POST['part_gewicht'];
$part_preis = $_POST['part_preis'];
$sql = 'INSERT INTO `partz_list`
( `id` , `part_hersteller` , `part_produkt` , `part_info` , `part_gewicht` , `part_preis` , `part_order` )
VALUES (
NULL , \'' . $part_hersteller . '\', \'' . $part_produkt . '\', \'' . $part_info . '\', \'' . $part_gewicht . '\', \'' . $part_preis . '\', \'500000\'
);';
if (mysql_query('$sql')) {
$output_title = '<font color="#00CC00">Erfolg!</font>';
$output_message = 'Part wurde erfolgreich hinzugefügt.';
}
else {
$output_title = '<font color="#CC0000">Error!</font>';
$output_message = 'Part konnte nicht hinzugefügt werden.';
}
die(mysql_errno() . ': ' . mysql_error());
renumber_order();
}
Die MySQL Datenbank ist Version 5.0.24a glaub ich. Wenn ich den Befehl ausgefüllt im phpmyadmin eingebe funktioniert es aber...1064: 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 '$sql' at line 1
Was zur Hölle ist da falsch?

hoffe auf schnelle antwort ^^
greetz