40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
session_start();
|
|
include("../scripts/connection.php");
|
|
include("../scripts/functions.php");
|
|
$user_data = check_login($con);
|
|
|
|
if($_SERVER['REQUEST_METHOD'] == "POST") {
|
|
write_team($con, $_POST['team_name'], $_POST['fire_department']);
|
|
header("Location: mannschaft.php");
|
|
die;
|
|
}
|
|
|
|
include("header_footer/header.php");
|
|
?>
|
|
|
|
<body>
|
|
<div class="headline">
|
|
<h2>Mannschaft hinzufügen</h2>
|
|
</div>
|
|
<div>
|
|
<form method="post">
|
|
<label for="team_name">Mannschaftsname</label>
|
|
<input type="text" name="team_name"/><br>
|
|
<label for="fire_department">Feuerwehr</label>
|
|
<input type="text" name="fire_department" list="fire_departments"/><br>
|
|
<datalist id="fire_departments">
|
|
<?php
|
|
load_fire_departments($con);
|
|
?>
|
|
</datalist>
|
|
<input id="button" type="submit" value="Hinzufügen">
|
|
</form>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
<?php
|
|
$con = null;
|
|
echo file_get_contents("header_footer/footer.html");
|
|
?>
|