is it possible to implode a checkbox value into multiple values to insert into a database?
At current I have this:
$tags = implode(', ', $_POST['checkboxname']);
This gives me the value of "testtag1, testtag2"
How would I split this up so it would go into the database like:
Blog ID ¦ Tag
------------------
1 ¦ testtag1
1 ¦ testtag2
Not sure how to make the implode function seperate them as this:
$query2 = mysqli_query($myConnection, "INSERT INTO blogtags (blogid, tag) VALUES('$blogid','$tags')") or die (mysqli_error($myConnection));
just inserts the two values together in one row.
Any help would be great! Thanks