Please Correct me here, i am trying to update or insert values in existing row in my database, but not able to this, all the variables is working but its not getting into database also checked in phpmyadmin sql query but it was not working there also, there it shows success but not a single data getting into mysql columns..
include("connect.php");
$sql = "UPDATE tblapps SET applsex='$applsex', placbrth='$placbrth', countrybrth='$countrybrth', religionxx='$religionxx', visualmark='$visualmark', edu_id='$edu_id', nationality_by='$nationality_by', prev_nationality='$prev_nationality', issueplace='$issueplace', expirydate='$expirydate', othpassport='$otherpassport', oth_passportno='$oth_pass_no', oth_pptissueplc='$oth_ppt_issue_place', oth_pptissuentl='$oth_ppt_nationality', country_issue='$country_issue', previssuedate='$previssuedate' WHERE app_id=$appid";
if(mysqli_query($link, $sql)){
echo "Records were updated successfully.";
} else {
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
?>
this is the error, I am getting.
ERROR: Could not able to execute UPDATE tblapps SET applsex='', placbrth='delhi', countrybrth='United States', religionxx='CHRISTIAN', visualmark='', edu_id='GRADUATE', nationality_by='By Birth', prev_nationality='', issueplace='delhi', expirydate='2018-11-01', othpassport='on', oth_passportno='9876546789', oth_pptissueplc='delhi', oth_pptissuentl='United States', country_issue='', previssuedate='2018-01-02' WHERE app_id='1515130357782247085'. Unknown column 'othpassport' in 'field list'