Accessing a form array with $_POST
<p>I have a form with checkbox inputs and all of them have name=[ ] to create and array. Like this:</p>

<pre><code>&lt;input type="checkbox" value= 1    
name="Todelete[]"/&gt;

&lt;input type="checkbox" value= 2
name="Todelete[]"/&gt;
</code></pre>

<p>And then I send the form data with the form action attribute to a PHP script.</p>

<p>I use:</p>

<pre><code>Foreach($_POST['todelete'] as $delete_id)
{
//Code to delete the rows of selected data
}
</code></pre>

<p>But for some reason I cannot get it to work. What am I doing wrong? I keep getting an error with my script.</p>
