Ok where am I going wrong here? I have a set of checkboxes called interests. This is repopulating from a mysql table, and as it is now it will echo the result only if it is a single checkbox ticked.
How do I get it to output if multiple checkboxes are ticked?
The second question is regarding putting the tick into the checkbox that are being returned from the table. Say if the user has previously selected government and opinion as subjects they are interested in. I need a tick inside the boxes.
If anyone has any ideas it would be greatly appreciated. Code snippet below....
$interests = array('technology','enterprise','research','government','people','lifestyle','opinion');
foreach($interests as $interestsinput)
{
if($interestsinput == $myrow['interests'])
{
echo ">".$myrow['interests']."</br>";
echo "checked";
}
}