choosing user picked check boxes (dynamically created) in PHP
<p>Hi I have a check box dynamically created as follows;(not the complete code here) there are a number of check boxes created, hence name is an array. (Is it right the way I have started the array inside <code>&lt;td&gt;&lt;/td&gt;</code>?)</p>

<pre><code>while ($rec = mysqli_fetch_array($result))
{
echo "&lt;tr&gt;";    
echo "&lt;td class='tbldecor1'&gt;&lt;input type='checkbox' name='delete[]' value='$Val1'&gt;&lt;/td&gt;";
echo "&lt;/tr&gt;";    
}
</code></pre>

<p>I need to get the user selected check box values to a loop in order to delete the records selected. If I forget about the deleting part of it, to get the user selected values to a loop I used something like below;</p>

<pre><code>$AA = $_POST['delete'];
while($AA == 'checked')
{
echo $AA; // trying to print the user checked options so that I can subsequently code  to delete them.
}
</code></pre>

<p>but seems an erroneous approach! Can someone please give me an idea?</p>
