1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
veranstaltung/orte.php

37 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2013-12-27 10:20:00 +01:00
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>Orte</title>
2013-12-27 10:20:00 +01:00
<meta name="author" content="Lukas" >
2013-12-29 11:26:32 +01:00
<link rel="stylesheet" href="./style.css" />
2013-12-27 10:20:00 +01:00
</head>
<body>
<?php
require_once "verbindungsaufbau.php"; //mit Server verbinden
$ergebnis = $mysqli->query("SELECT * FROM orte"); //SQL Befehl ausführen
echo "<table border='1'>\n";
echo "<tr><th>Name</th><th>Stadt</th><th>Straße</th><th>Ändern</th><th>Löschen</th>"; //Zeile mit Überschriften
while ($zeile = $ergebnis->fetch_array()) {
echo "<tr><td>" . htmlspecialchars($zeile["ort_name"]) . "</td>"
. "<td>" . htmlspecialchars($zeile['plz']) . " " . htmlspecialchars($zeile['stadt']) . "</td> "
. "<td> " . htmlspecialchars($zeile['strasse']) . " " . htmlspecialchars($zeile['hausnummer']) . "</td>"
2013-12-29 11:26:32 +01:00
. "<td><a class='tabelle' href='./ort_aendern.php?id=" . htmlspecialchars($zeile['ort_id']) . "'>ändern</a></td>"
. "<td><a class='tabelle' href='./ort_loeschen.php?id=" . htmlspecialchars($zeile['ort_id']) . "'>löschen</a></td>"
2013-12-27 10:20:00 +01:00
."</td></tr>\n" ;
}
echo "</table>";
$ergebnis->close();
$mysqli->close();
?>
<a href="ort_erstellen.php">neuen Ort hinzufügen</a>
2013-12-27 10:51:12 +01:00
<br /><a href="veranstaltungen.php">zurück zu den Veranstaltungen</a>
2013-12-27 10:20:00 +01:00
</body>
</html>