In your html, inside a Form, name all your checkboxes as such.
<form method="post" action="yourscript.php">
<input type="checkbox" name="cbox[]" value="sample1" />
<input type="checkbox" name="cbox[]" value="sample2" />
<input type="checkbox" name="cbox[]" value="sample3" />
<input type="checkbox" name="cbox[]" value="sample4" />
<input type="checkbox" name="cbox[]" value="sample5" />
<input type="submit" value="submit" />
</form>
Then after post, do something like this:
$string=NULL;
if(count($_REQUEST['cbox']))
{
foreach($_REQUEST['cbox'] as $cbox)
{
$string.='CBOX VALUE - '.$cbox.'<br />';
}
echo $string;
}
NOTE - $REQUEST is an alternative to using $POST as it picks up either $POST or $GET values
Let me know if you need help figuring out what to do with the data after post.