This question probably has a simple solution. Here's what I am doing:
I am dynamically creating checkbox inputs with a PHP loop.
<td><input type=\"checkbox\" class=\"current\" name=\"User[$row[0]]\" value=\"1\" ></td>
This snippet, name=\"User[$row[0]]\", is part of an array that is passed via post upon submission. Rather than using User[], I define the associative array by using $row[0]. $row[0] allows me to use a unique identifier that is really a UserId - it is guaranteed to be unique. The value of an instance of a submitted array is either 1 or 0 (true or false). This is a result of print_r(said array):
Array ( [1] => 1
[12] => 0
[31] => 1
[4] => 1 )
What I need to do is use the User Id (which happens to be the identifier of a component of the array, i.e. 1, 12, 31...) in a SQL query. For example.
UPDATE...WHERE UserId = array identifier
At the same time, I need to use the value of that component (0 or 1) in that same query.
Any input is appreciated.