How do I post two Arrays and query one of them?
Posted: Thu May 14, 2015 7:44 am
This is in my form:
The idea is if they tick the Star box as well as the ID box, then their comment is awarded a star.
At the top of the page, it does this:
So how do I, within the foreach loop, query the star array, and see if there is a YES in the variable??
Code: Select all
<td valign='top'>
<input type='checkbox' name='id[]' value='$row->id' id='$row->id'>
</td>
<td valign='top' align='center'>
<input type='checkbox' name='star[]' value='yes' id='$row->id'>
</td>At the top of the page, it does this:
Code: Select all
foreach($_POST['id'] as $id)
{
// magic happens
}