add files
This commit is contained in:
26
db/write.php
Normal file
26
db/write.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
include_once '../config/config.php';
|
||||
|
||||
$errors = [];
|
||||
$data = [];
|
||||
|
||||
|
||||
//Terminvorschlag 1 Prüfung ob zugesagter termin bereits belegt
|
||||
if (empty($_POST['vorname'])) {
|
||||
$errors['vorname'] = 'ID FEHLT!.';
|
||||
}
|
||||
|
||||
//$id = $_POST['id'];
|
||||
$sql = "UPDATE kunden SET vorname='".$_POST['vorname']."', nachname='".$_POST['nachname']."', straße='".$_POST['straße']."', ort='".$_POST['ort']."', plz='".$_POST['plz']."', telefonnummer='".$_POST['telefonnummer']."', fahrzeuge='".$_POST['fahrzeuge']."' where id=".$_POST['id']."";
|
||||
$db->query($sql);
|
||||
|
||||
$data['success'] = true;
|
||||
|
||||
echo json_encode($data);
|
||||
|
||||
|
||||
|
||||
|
||||
//echo json_encode($data);
|
||||
Reference in New Issue
Block a user