Hi Smurf_UK,
The first thing I should note is that when you post an array of html checkboxes, they'll appear as an array of checkboxes when PHP gets a hold of them. So the first thing you could do would be this:
$workStyle = $_POST['work_style'];
var_dump($workStyle);
What you'll find is that the var_dump will bring back the information that the variable is an array with a certain number of elements. Now you want all of those elements to go into a single string of code, so you can put it in the database. The next step is then to cycle through that array, and add each element to the same string, by concatenating them:
// Setting up a blank variable to be used in the coming loop.
$allStyles = "";
// For every checkbox value sent to the form.
foreach ($workStyle as $style) {
// Append the string with the current array element, and then add a comma and a space at the end.
$allStyles .= $style . ", ";
}
If you were to echo that string out now, you'd see all your values seperated by a comma and a space. The next problem is that the very last entry into the string will also put a comma and a space at the end. That's useless because there's no data coming next so lets get rid of it:
// Delete the last two characters from the string.
$allStyles = substr($allStyles, 0, -2);
Now you've got all the entries into a handy string seperated by commas and spaces! You can just add this to the database like you did with every other string!
A side note is that when your bringing it back out of the database, you can use a function called explode that will search for ", " (the comma and space) and that will make it back into an array for you to play with.
I hope that helps you; any other questions please don't be afraid to ask!
Anthony