I have an absolute beginner question here. I'm having trouble getting multiple checkbox entries into a single column in my database. I've tried a few different things with my php but can't seem to get anything to work properly. I've tried using serialize as well as looked into using implode/explode. Sorry I'm basically asking to be spoon-fed because I know its a simple fix, I just haven't been able to get anything to work yet. Any assistance would be appreciated. THANKS!!! Also The three checkboxes I have are system, comm, and other and I do have the brackets for my 3 inputs even though the php isn't setup to handle them yet, so for now my DB is still showing Array for these inputs. Here is my php
<?php
$con = mysql_connect("localhost","Andrew","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mydb", $con);
$sql="INSERT INTO persons (firstname, lastname, modelid, system, department, comm, other, shift, comments)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[modelid]','$_POST[system]','$_POST[departme nt]','$_POST[comm]','$_POST[other]','$_POST[shift]','$_POST[comments]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con);
?>