Datenstand V1.0
This commit is contained in:
41
inhalte/pos_save.php
Normal file
41
inhalte/pos_save.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
$Feld1 = $Feld2 = $Feld3 = $Feld4 = $Feld5 = "";
|
||||
if (isset($_POST['Feld1'])) {
|
||||
$Feld1 = "Feld1 = \"".addslashes($_POST['Feld1'])."\",";
|
||||
}
|
||||
if (isset($_POST['Feld2'])) {
|
||||
$Feld2 = "Feld2 = \"".addslashes($_POST['Feld2'])."\",";
|
||||
}
|
||||
if (isset($_POST['Feld3'])) {
|
||||
$Feld3 = "Feld3 = \"".addslashes($_POST['Feld3'])."\",";
|
||||
}
|
||||
if (isset($_POST['Feld4'])) {
|
||||
$Feld4 = "Feld4 = \"".addslashes($_POST['Feld4'])."\",";
|
||||
}
|
||||
if (isset($_POST['Feld5'])) {
|
||||
$Feld5 = "Feld5 = \"".addslashes($_POST['Feld5'])."\",";
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO ".PREFIX."_".$t_pos."_Pos SET
|
||||
ID = NULL,
|
||||
Jahr = \"".$Jahr."\",
|
||||
".$t_pos."_ID = \"".$ID."\",
|
||||
Position = \"".$_POST['Position']."\",
|
||||
Anzahl = \"".$_POST['Anzahl']."\",
|
||||
Bezeichnung = \"".$_POST['Bezeichnung']."\",
|
||||
".$Feld1."
|
||||
".$Feld2."
|
||||
".$Feld3."
|
||||
".$Feld4."
|
||||
".$Feld5."
|
||||
Preis = \"".$_POST['Preis']."\";";
|
||||
$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