Goal: Check to see if an item is contained in the query if so check a box.
So far I got the DB storing items as a set variable. Which I have setup using INSERT and a form adding up checkbox values, no problem. Now I want to populate check boxes depending on stored data, For UPDATE. The DB connection is an include so.. I am just providing the code that is important(I Hope). There are 12 checkboxes and there 12 set options obviously. For each box i assumed I'd use the if (in_array()) evaluation below. Looking for a True/False answer not a key number or anything else.
The set value in the example that should trip the checkbox should be As Originals. That is what is defined in the set.
mysql_select_db($database_ws_data, $ws_data);
$query_originals = sprintf("SELECT * FROM ws_jobs_image WHERE id = %s", $colname_originals);
$originals = mysql_query($query_originals, $ws_data) or die(mysql_error());
$row_data = mysql_fetch_assoc($originals);
$totalRows_originals = mysql_num_rows($originals);
$originalStatus = $row_originals['originals'];
$originalStatusTemp = explode(",", $originalStatus);
html in doc
[code=php]
<li><input <?php if (in_array("As Originals", $originalStatusTemp)) {echo "checked";} ?> name="AsOriginals" type="checkbox" value="1" />As Original</li>
What i get is a value of Array when i try to echo the varible $originalStatusTemp. Then i specified a key number and it gave me the individual items. So maybe i can search the results and not explode the result in to an array ???