-
Notifications
You must be signed in to change notification settings - Fork 1
/
ModalEditKlas.php
31 lines (31 loc) · 1.33 KB
/
ModalEditKlas.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<div id="ModalEditKlas" class="modal">
<div class="modal-header" style="padding-left: 24px;">
<h5> Bewerken</h5>
</div>
<div class="modal-content">
<form method="POST">
<label>Om een Klas aan te passen dient u de aanpassingen op te slaan:</label>
<input type="hidden" class="form-control" style="border-radius: 0;" name="klas_id" id="klas_id">
<input type="text" class="form-control hide" style="border-radius: 0;" name="klas_naam" id="klas_naam" placeholder="Naam">
<button type="submit" name="edit_klas_submit" class="btn btn-success" value="Opslaan">Opslaan</button>
<a href="#!" class="modal-action modal-close waves-effect waves-green btn btn-success ">Sluiten</a>
</form>
</div>
</div>
<?php
if (isset($_POST["edit_klas_submit"])) {
if (isset($_POST["klas_naam"])) {
$edit_klas_id = $_POST["klas_id"];
//echo $edit_student_id;
$edit_klas_naam = $_POST["klas_naam"];
//echo $edit_student_naam;
$edit_klas = "UPDATE klas SET klas_naam='$edit_klas_naam' WHERE klas_id = $edit_klas_id";
//echo $edit_student;
if ($conn->query($edit_klas) === TRUE) {
//echo "Record updated successfully";
} else {
//echo "Error updating record: " . $conn->error;
}
}
}
?>