Can someone please help me what is wrong with this syntax. when i run this, it doesn't insert the values into the table.
Currently all the variables e.g $land
, etc have a value.
in my database table, all except $nOwners,$id(int)
are defined as varchar
, .
Details:
I am using Mysqli
$sql= "INSERT into property_list (id, title_no, status, register_type, type,land_district, issue_date,guarantee_status,provisional,title_no_srs,title_no_head_srs, survey_reference, Maori_land, number_owners)
VALUES($id,'$title', '$status', '$register', '$type', '$land', '$issue_date', '$guarantee', '$provision', '$title_no_srs','$head_srs', '$survery', '$maori', $nOwners)";
if($conn->query($sql)!==false)
{
$flag=false;
echo "successfully inserted ";
}