Files
frisoer-anwendung/app/list/kunde.php
2021-06-21 10:47:16 +02:00

54 lines
972 B
PHP

<?php
include '../head.php';
echo '<h1>Kunden Übersicht</h1>';
?>
<table >
<tr>
<th>Kunden Nr.</th>
<th>Vorname</th>
<th>Nachname</th>
<th>Funktionen</th>
</tr>
<?php
include '../connect.php';
$query="select * from kunde";
$result=$sql->query($query);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
$id=$row["Kundenummer"];
$vorname=$row["Vorname"];
$nachname=$row["Nachname"];
echo "<tr>
<td>$id</td>
<td>$vorname</td>
<td>$nachname</td>
<td><a href='/view/kunde.php?id=$id'>Details</a></td>
</tr>";
}
} else {
echo "<p> 0 results </p>";
}
?>
</table>
<fieldset>
<legend style="border: 1px black solid;margin-left: 1em; padding: 0.2em 0.8em ">Funktionen</legend>
<a href="/view/kunde-create.php">Kunden hinzufügen</a>
</fieldset>
<?php
include '../tail.php';
?>