HH
2012-06-18 13:48:59 UTC
$name = $_POST['name'];
$city = $_POST['city'];
$country = $_POST['country'];
$email = $_POST['email'];
$desc = $_POST['desc'];
$sql = "INSERT INTO complaint registration (name, city, country, email, desc)
VALUES
('$name', '$city', '$country', '$email', '$desc')";
if (mysql_query($sql)) {
echo "Complain registered succcessfully";
} else {
echo "Complaint not registered.";
}
The error:
"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...."
The Connection with the database was successful. The connection was closed later on in the script. Please help.