I have the following code.
<?php
include ('include/DB_Functions.php');
if(isset($_POST['submit']))
{ $id =$_REQUEST['roomid'];
$title = $_POST['title'];
$uid = $_POST['clientId'];
$location = $_POST['location'];
$quantity = $_POST['number'];
$price = $_POST['price'];
$size = $_POST['size'];
$description = $_POST['description'];
$categoryID = 1;
$sellerAddress = $_POST['selleradd'];
$sellerPhone = $_POST['sellerphn'];
mysql_query("UPDATE room_tb SET location ='$location', quantity ='$quantity',price ='$price',area ='$size' description = '$description' postTitle = '$title' WHERE roomID = '$id'")
or die(mysql_error());
echo "Saved!";
header('Location:table.php');
}
I get an 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 'description = '' postTitle = '' WHERE roomID = '983'' at line 1 What have i done wrong. The DB_Functions.php contains all database connectivity.