save
This commit is contained in:
@@ -1,18 +1,92 @@
|
||||
<?php
|
||||
include '../head.php';
|
||||
echo '<h1>Kunden Ansicht</h1>';
|
||||
$id= $_GET['id'];
|
||||
echo "<h2>Kunde $id</h2>";
|
||||
include '../connect.php';
|
||||
?>
|
||||
<?php
|
||||
include '../head.php';
|
||||
echo '<h1>Kunden Ansicht</h1>';
|
||||
$id = $_GET['id'];
|
||||
|
||||
include '../connect.php';
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
echo "<h2>Kunde $id</h2>";
|
||||
|
||||
$stmp = $sql->prepare("select * from Kunde where Kundenr=?;");
|
||||
|
||||
$stmp->bind_param('i', $id);
|
||||
$stmp->execute();
|
||||
$result = $stmp->get_result();
|
||||
|
||||
if ($result->num_rows == 1) {
|
||||
$row = $result->fetch_assoc();
|
||||
$gender = $row['Geschlecht'];
|
||||
$vorname = $row['Vorname'];
|
||||
$nachname = $row['Nachname'];
|
||||
$geburtstag = $row['Geburstag'];
|
||||
$tele = $row['Telefonnr'];
|
||||
$haarstruktur = $row['Haarstruktur'];
|
||||
$haarlaenge = $row['Haarlaenge'];
|
||||
echo "<form action='kunde-save.php' method='post'>
|
||||
|
||||
<label for='gender'>ID: </label>
|
||||
<input type='text' id='id' name=id readonly=true value=$id> <br>
|
||||
|
||||
<label for='gender'>Geschlecht: </label><br>
|
||||
<select name='Geschlecht' id='gender'>
|
||||
";
|
||||
|
||||
|
||||
switch ($gender) {
|
||||
case "m":
|
||||
echo "<option value='w'>Weiblich</option>";
|
||||
echo "<option value='m' selected>Männlich</option>";
|
||||
echo "<option value='d' >Diverse</option>";
|
||||
break;
|
||||
case "w":
|
||||
echo "<option value='w' selected>Weiblich</option>";
|
||||
echo "<option value='m'>Männlich</option>";
|
||||
echo "<option value='d'>Diverse</option>";
|
||||
break;
|
||||
case "d":
|
||||
echo "<option value='w'>Weiblich</option>";
|
||||
echo "<option value='m'>Männlich</option>";
|
||||
echo "<option value='d' selected>Diverse</option>";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
echo "
|
||||
</select><br>
|
||||
<label for='fname'>Vorname: </label><br>
|
||||
<input type='text' id='fname' name='Vorname' value='$vorname'><br>
|
||||
<label for='lname'>Nachname: </label><br>
|
||||
<input type='text' id='lname' name='Nachname' value='$nachname'><br>
|
||||
<label for='start'>Geburtstag:</label><br>
|
||||
<input type='date' id='geburtstag' name='Geburstag'
|
||||
value='$geburtstag'><br>
|
||||
<label for='phone'>Telefonnummer: </label><br>
|
||||
<input type='tel' id='phone' name='Telefonnr.'
|
||||
pattern='+[0-9]{3}-[0-9]{3}-[0-9]{4}'
|
||||
value='$tele'>
|
||||
<br>
|
||||
<label for='laenge'>Haarlänge: </lable><br>
|
||||
<input name='Haarlaenge' type='number' id='laenge' value='$haarlaenge'><br>
|
||||
<label for='haar'>Haarstruktur: </lable><br>
|
||||
<input name='Haarstruktur' type='text' id='haar' value='$haarstruktur'><br>
|
||||
<p><input type='submit'/></p>
|
||||
</form>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
include '../tail.php';
|
||||
include '../tail.php';
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user