New in php, older in MySQL.
I have a dynamically created table in php (colors from a table with an id and aname) with the names of the color and a checkbox for each. I have no value (now) for those checkboxes and I cannot address them.
I want to use those checked boxes to make a SELECT statement:
SELECT polish.*,colors.name
FROM colors
inner join polish on colors.id=polish.colorid
WHERE colors.name=....
OR colors.name=....
etc.;
something like that
<table class="std">
<tr>
<th>Colour</th>
<th>Include</th>
<th colspan="3"> </th>
</tr>
<?php
require_once("Includes/db.php");
$result = polishDB::getInstance()->get_colours()?>
<?php
while ($row = mysqli_fetch_array($result)):
echo "<tr><td>" . htmlentities($row['name']) . "</td>";
?>
<td><input type="checkbox" name="col_list[]" value="ON"/></td>
<?php
echo "</tr>\n";
endwhile;
mysqli_free_result($result);
?>
</table>
idas a value.