is there a way to have check boxes checked if that value is present in a database using an array, without having a separate database column for each choice?
example:
<?php
$options = array('$_POST['options]');
$query = "INSERT INTO gallery (artwork) VALUES ($options) WHERE id = $_SESSION['mem_id]";
?>
then when returning:
<?php ...
$query = "SELECT artwork FROM gallery WHERE id = $_SESSION['mem_id]";
$result = mysql($query);
$row = mysql_fetch_array($result, MYSQL_ASSOC);
?>
...
<?php
<form action=' . $_SERVER['PHP_SELF'] . 'method="post">
<input name="options[]" type="checkbox" value=0 >
<input name="options[]" type="checkbox" value=1>
?>
so i what i need to know is how to identify which options have been returned so i can add the 'checked' parameter to the check box. implode() maybe? but how?
thanks so much and i hope this makes sense