you can now set if a station needs points or get the results of the excersice and the website should calculate the points

This commit is contained in:
Grisu
2022-09-22 11:22:25 +02:00
parent eacf3ce9b5
commit c3873744be
5 changed files with 45 additions and 5 deletions

View File

@@ -8,7 +8,8 @@
if(isset($_POST['save'])){
$station_name = sanitize_input($_POST['station_name']);
$station_pos = sanitize_input($_POST['station_pos']);
write_station($con, $station_name, $station_pos);
$station_direct_points = sanitize_input($_POST['direkte_punkte']);
write_station($con, $station_name, $station_pos, $station_direct_points);
}
header("Location: stationen.php");
die;
@@ -34,6 +35,13 @@
<span></span>
<label for="station_pos">Standort</label>
</div>
<div class="dropdown">
<label for="direkte_punkte">Punkte eintragen</label>
<select name="direkte_punkte" id="direkte_punkte">
<option value="1" selected>Ja</option>
<option value="0">Nein</option>
</select>
</div>
<input id="button" type="submit" value="Hinzufügen" class="btn-confirm" name="save"/>
<a href="stationen.php" class="btn-close">Schließen</a>
</form>