Error description: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘’ at line 1
Can someone help me find this?
session_start();
//initialize variables
$Naam = "";
$Email = "";
$Pand = "";
$Huisnummer = "";
$Deel = "";
$id = 0;
// connect to database
$db = mysqli_connect("xxx","xxx","xxx","xxx");
//update records
if (isset($_POST['update'])){
$Naam = mysqli_real_escape_string($_POST['Naam']);
$Email = mysqli_real_escape_string($_POST['Email']);
$Pand = mysqli_real_escape_string($_POST['Pand']);
$Huisnummer = mysqli_real_escape_string($_POST['Huisnummer']);
$Deel = mysqli_real_escape_string($_POST['Deel']);
$id = mysqli_real_escape_string($_POST['id']);
if (!mysqli_query($db, "UPDATE Info SET Naam='$Naam' , Email='$Email' , Pand='$Pand' , Huisnummer='$Huisnummer' , Deel='$Deel' WHERE id=$id")){
echo("Error description: " . mysqli_error($db));
}
header('location: overzichtlocatie.php');
}
// retrieve records
$results = mysqli_query($db, "SELECT * FROM info");