15 lines
824 B
PHP
15 lines
824 B
PHP
<?php
|
|
$sql = "SELECT * FROM " . PREFIX . "_Artikel WHERE ID = \"" . $_POST['Art_ID'] . "\";";
|
|
$result = $db->query($sql);
|
|
$nt = $result->fetch_assoc();
|
|
|
|
$sql = "INSERT INTO " . PREFIX . "_" . $t_pos . "_Pos (ID, Jahr, " . $t_pos . "_ID, Position, Anzahl, Bezeichnung, Preis, Feld1, Feld2, Feld3, Feld4, Feld5) VALUES (NULL, \"" . $Jahr . "\", \"" . $ID . "\", \"" . $_POST['Position'] . "\", \"" . $_POST['Anzahl'] . "\", \"" . $nt['Bezeichnung'] . "\", \"" . $nt['Preis'] . "\", \"" . addslashes($nt['Feld1']) . "\", \"" . $nt['Feld2'] . "\", \"" . $nt['Feld3'] . "\", \"" . $nt['Feld4'] . "\", \"" . $nt['Feld5'] . "\")";
|
|
$stmt = $db->prepare($sql);
|
|
if (!$stmt)
|
|
{
|
|
die ('Datensatz konnte nicht angelegt werden: ' . $db->error);
|
|
}
|
|
if (!$stmt->execute())
|
|
{
|
|
die ('Datensatz konnte nicht angelegt werden: ' . $stmt->error);
|
|
} |