Hi I have a form and I have a list of checkboxes I am trying to check 2 or all of them and get them to insert into one sql column in my database. When I select them it submits ok but in the cloumn on the database is storing it as Array not the values I have checked.
Here is the form and the code.
<form name="padform" method="post" action="catsubmit.php" />
<input name="userID" type="hidden" id="userID" value="<?=$userID?>">
<table width="540" cellspacing="3" cellpadding="0" border="0">
<tr>
<td width="300" id="t_category1">
<input type="checkbox" name="vccategory[]" value="Quality Control & Consultants">Quality Control & Consultants</td></tr>
<tr>
<td><input type="checkbox" name="vccategory[]" value="Quilting Materials & Supplies">Quilting Materials & Supplies</td></tr>
<tr>
<td><input type="checkbox" name="vccategory[]" value="Quilts & Quilting">Quilts & Quilting</td></tr>
<tr>
<td><input name="submit" type="submit" class="button" value="Submit Ad" /><input class="button" type="reset" name="reset" value="Reset" /></td>
</tr>
</table>
</form>
the submit file
<?
session_start();
error_reporting(apsolutions);
?>
<?PHP
include("../secure/global/connection.php");
include("../secure/global/mail.class.php");
error_reporting(7);
$vccategory = ($_POST['vccategory']);
$intUserID = ($_POST["userID"]);
{
$insertsql = " insert into tbladvertdetails (intUserID, vccategory, dtCreatedOn) values ('".addslashes($intUserID)."','".addslashes($vccategory)."','".date("Y-m-d h:m:s")."')";
$DB_site->query($insertsql);
$accountid = mysql_insert_id();
}
?>
<script>
alert("Profile UPdated")
document.location.href="adcat.php"
</script>
Any help with this wil be appreciated