Escape texts before writing to database.
This commit is contained in:
@@ -28,8 +28,8 @@ if (!isset($_POST['Speichern'])) {
|
||||
|
||||
<?php
|
||||
} else {
|
||||
$Autor = $_POST['Autor'];
|
||||
$Text = $_POST['Text'];
|
||||
$Autor = $db->real_escape_string($_POST['Autor']);
|
||||
$Text = $db->real_escape_string($_POST['Text']);
|
||||
$Datum = $_POST['Datum'];
|
||||
$sql2 = 'UPDATE gb SET Autor = "' . $Autor . '", Text = "' . $Text . '", Datum = "' . $Datum . '" WHERE ID = "' . $_POST['id'] . '";';
|
||||
$stmt2 = $db->prepare($sql2);
|
||||
|
||||
Reference in New Issue
Block a user