delete button layout
<p>I've gone through a solution on processing checkboxes and think I understand what I need to do, but I have a problem where I put my delete button in this code.  Here is my table:</p>

<pre><code>&lt;table&gt;
    &lt;thead&gt;
    &lt;tr&gt;
        &lt;th&gt;Camera Name&lt;/th&gt;
        &lt;th&gt;Date Created&lt;/th&gt;
        &lt;th&gt;Video Size&lt;/th&gt;
        &lt;th&gt;Video Length&lt;/th&gt;
        &lt;th&gt;
            &lt;button type="submit" class="deletebutton" name="delete_video" value="Delete" title="Delete the selected videos" onClick="return confirm('Are you sure you want to delete?')"&gt;Delete&lt;/button&gt;&lt;br&gt;
            &lt;input type="checkbox" name="radioselectall" title="Select All" /&gt;
        &lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;

 &lt;?php

for($i=0;$i&lt;$num_videos;$i++)
{
       //do stuff
       //Note: I'm looping here to build the table from the server
?&gt;              
        &lt;tr &gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo $result_videos[$i]["camera_name"]; ?&gt; 
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo setlocalTime($result_videos[$i]["video_datetime"]); ?&gt; 
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo ByteSize($result_videos[$i]["video_size"]); ?&gt;
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                &lt;?php echo strTime($result_videos[$i]["video_length"]); ?&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;form name="myform" action="&lt;?php echo htmlentities($_SERVER['REQUEST_URI']); ?&gt;" method="POST"&gt;
                &lt;input type="checkbox" name="radioselect" title="Mark this video for deletion"/&gt;
                &lt;input type="hidden" name="video_name" value="&lt;?php echo $result_videos[$i]["video_name"]; ?&gt;" /&gt;
                &lt;/form&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
...
</code></pre>

<p>Notice that I loop through and populate the table from the server but the header is not looping through obviously.  I used to put the delete button in the form and on each line of the table.  But now since I want multi-delete I create checkboxes on each line and put the delete button in the header.  I should also note that <code>video_name</code> is crucial so I know what videos to delete.</p>

<p>But that is the problem, since I don't have a submit (delete) in the form (that is in the loop) I can't process theses checkboxes.  Instead I only have the delete button Can anyone suggest a better way to do this?</p>
