Datenstand V1.0
This commit is contained in:
15
inhalte/art_save.php
Normal file
15
inhalte/art_save.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user