I'm getting an error that says
Warning: implode():Invalid arguments passed
I do not understand why it is so...
Here is my code.
if(isset($_POST['consultationbutton'])){
$image = addslashes(file_get_contents($_FILES['selectedfile']['tmp_name'])); //SQL Injection defence!
$checkedcondition = implode(",",$_POST['skincondition']);
$checkedproduct = implode(",",$_POST['skincareinuse']);
$consultquery="INSERT INTO counsel(nric,dateconsulted,editableface,skincarecurrentlyinuse,skincondition) VALUES('132','$_POST[storedate]','{$image}','$checkedproduct','$checkedcondition')";
mysqli_query($dbconn,$consultquery);
}
$_POST['skincondition'] and $_POST['skincareinuse'] are the name of my checkboxes.
$_POST['skincondition']or$_POST['skincareinuse']are not arrays. Did you check their contents?explodehere if you need to convert them to string or make the checkbox field name asskincareinuse[]