I think the insert query should ends with semicolon as the similar code is working for another form. But it shows this error:
PHP Parse error: syntax error, unexpected ';'
Here is my piece of PHP script for insert data into database from a form.
if((!empty($name) && !empty($location) && !empty($fulladdress) && !empty($ownername) && !empty($ownercontact) && !empty(category) &&
($invalidphflag==true) && ($phoneflag==true) && !empty($size) && !empty($price) )
{
$insertquery= "INSERT INTO properties (name, location, address, owner_name, owner_no, size, price, category)
VALUES ('$name', '$location', '$fulladdress', '$ownername', '$ownercontact', '$size', '$price', '$category')";
$query = mysqli_query($db, $insertquery);
if($query)
{
$success= "Details submitted successfully.";
}
}