Hallo,
Ik ben bezig met het maken van een custom cms. Het ging goed totdat ik kwam bij het updaten van de database.
Ik krijg de volgende foutmelding:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 're looking for. But if you don't find any website template you can use, you can ' at line 1
Dit is mijn code waarmee hij correspondeert als hij deze fout geeft:
<?php
// If user pressed "Update Content" button
if(isset($_POST['editContent'])){
// Update the page's content
require("includes/connection.php");
$content = $_POST['content'];
$id = $_POST['id'];
$sql = "UPDATE pages SET content='$content' WHERE id='$id'";
$result = $connection->query($sql) or die(mysqli_error($connection));
if($result){
header("location: admin.php?message=1");
}
}
?>
Iemand enig idee wat ik moet doen?
754 views