36 lines
696 B
PHP
36 lines
696 B
PHP
<?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);
|