-
Notifications
You must be signed in to change notification settings - Fork 1
/
ModalEditNormering.php
28 lines (28 loc) · 1.42 KB
/
ModalEditNormering.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
<div id="ModalEditNormering" class="modal">
<div class="modal-header" style="padding-left: 24px;">
<h5> Bewerken</h5>
</div>
<div class="modal-content">
<form method="POST">
<i class="material-icons prefix tiny">mode_edit</i><label>Om een normeringswaarde aan te passen voert u hier de wijziging in:</label>
<input type="hidden" class="form-control" style="border-radius: 0;" name="normering_id" id="normering_id">
<input type="text" class="form-control hide" style="border-radius: 0;" name="normering_naam" id="normering_naam" placeholder="Normering">
<button type="submit" name="edit_normering_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_normering_submit"])) {
if (isset($_POST["normering_naam"])) {
$edit_normering_id = $_POST["normering_id"];
$edit_normering_naam = $_POST["normering_naam"];
$edit_normering = "UPDATE criterium_normering SET criterium_normering_naam='$edit_normering_naam' WHERE criterium_normering_id = $edit_normering_id";
if ($conn->query($edit_normering) === TRUE) {
//echo "Record updated successfully";
} else {
//echo "Error updating record: " . $conn->error;
}
}
}
?>