Files
PunkteSystem-KSP/app/public/add_station.php
2022-06-09 22:20:05 +02:00

33 lines
938 B
PHP

<?php
session_start();
include("../scripts/connection.php");
include("../scripts/functions.php");
$user_data = check_login($con);
if($_SERVER['REQUEST_METHOD'] == "POST") {
write_station($con, $_POST['station_name'], $_POST['station_pos']);
header("Location: stationen.php");
die;
}
include("header_footer/header.php");
?>
<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("header_footer/footer.html");
?>