Any help I can get is appreciated.
Error: The following error occurred: 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 ''call'='no' WHERE applicant_id = '1'' at line 1
<?php
$errors_array = array();
if(!empty($_POST['call'])){
$call = $_POST['call'];
}else{
$errors_array[] = "<p>You did not select whether to call this applicant or not</p>";
}
if(!empty($_POST['applicant_id'])){
$applicant_id = $_POST['applicant_id'];
}else{
$errors_array[] = "<p>You did not select applicant_id</p>";
}
if(count($errors_array) > 0){
foreach($errors_array as $value) {
echo $value;
}
}else{
for($i=0; $i<count($call); $i++){
$one_call = $call[$i];
$one_app_id = $applicant_id[$i];
$insert_Applicant = "UPDATE Applicant SET 'call'='$one_call' WHERE applicant_id = '$one_app_id'";
$exec_insert_Applicant = mysqli_query($link, $insert_Applicant);
if(!$exec_insert_Applicant){
echo "UPDATE Applicant SET call='$one_call' WHERE applicant_id = $one_app_id";
echo "The following error occurred: ".mysqli_error($link);
}
}
}
?>