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