add stations
This commit is contained in:
32
app/public/add_station.php
Normal file
32
app/public/add_station.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
session_start();
|
||||
include("../scripts/connection.php");
|
||||
include("../scripts/functions.php");
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
write_station($con, $_POST['station_name'], $_POST['station_pos']);
|
||||
header("Location: stationen.php");
|
||||
die;
|
||||
}
|
||||
|
||||
echo file_get_contents("html/header.html");
|
||||
?>
|
||||
|
||||
<body>
|
||||
<div class="headline">
|
||||
<h2>Station hinzufügen</h2>
|
||||
</div>
|
||||
<div>
|
||||
<form method="post">
|
||||
<label for="station_name">Name:</label>
|
||||
<input id="station_name" type="text" name="station_name"/><br>
|
||||
<label for="station_pos">Standort:</label>
|
||||
<input id="station_pos" type="text" name="station_pos"/><br>
|
||||
<input id="button" type="submit" value="Hinzufügen"/>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
<?php
|
||||
$con = null;
|
||||
echo file_get_contents("html/footer.html");
|
||||
?>
|
||||
Reference in New Issue
Block a user