Checkbox delete several jobs/rows
<p>Hi: I have a legacy php4 app that we still have several clients using.
one client wants to have a feature added to a listing page that will allow them to select several jobs and then delete those selected in one click.</p>

<p>I want to add a column to the left of the current first column that contains a check-box user selects as many check-boxes as he wants, then clicks delete and those 5, 8, 20 are deleted, actually archived in this case.</p>

<p>so I basically want similar functionality that's in gmail applied in this code base.</p>

<p>Any help would be appreciated.</p>

<p><strong>Here is the code that spits out the job listing page</strong>
    </p>

<pre><code>function getRequest(rn)
{
    document.forms.intake.R_NUMBER.value=rn;
    goTo('WHOLEBRIEF','display');
}

function archiveRequest(rn)
{
    if(confirm('Are you sure you want to remove this request?'))
    {
        document.forms.intake.R_NUMBER.value=rn;
        goTo('LIST','remove');
    }
}

&lt;/script&gt;

&lt;SCRIPT LANGUAGE="JavaScript" SRC="include/table.js"&gt;&lt;/SCRIPT&gt;
&lt;SCRIPT LANGUAGE="JavaScript" SRC="include/jquery.js"&gt;&lt;/SCRIPT&gt;
&lt;style type="text/css"&gt;
th.table-sortable {
    cursor:pointer;
    background-image:url("/images/sortable.gif");
    background-position:center left;
    background-repeat:no-repeat;
    padding-left:12px;
}
th.table-sorted-asc {
    background-image:url("/images/sorted_up.gif");
    background-position:center left;
    background-repeat:no-repeat;
}
th.table-sorted-desc {
    background-image:url("/images/sorted_down.gif");
    background-position:center left;
    background-repeat:no-repeat;
}
tr.alternates {
    background-color:#f0f0f0;
}
&lt;/style&gt;
&lt;input type="hidden" name="JOB_NUMBER"&gt;
 &lt;center&gt;
&lt;table class="jobs" width="700" cellpadding="0" cellspacing="0"&gt;
&lt;tr&gt;
&lt;td align="center"&gt;
&lt;label&gt;Show All Jobs&lt;/label&gt;

&lt;table width="1150" style="border: 1px solid #660099;" class="jobs sort01 table-autosort table-autofilter table-stripeclass:alternate table-filtered-rowcount:t1filtercount"&gt;
&lt;thead&gt;
&lt;tr bgcolor="#cccccc" align="center"&gt;
&lt;th width="50"  class="table-sortable:numeric"&gt;&lt;label&gt;Number&lt;/label&gt;&lt;/td&gt;
&lt;th width="200" class="table-filterable table-sortable:default"&gt;&lt;label&gt;Requested By&lt;/label&gt;&lt;/td&gt;
&lt;th width="200" class="table-sortable:default"&gt;&lt;label&gt;Project Name&lt;/label&gt;&lt;/td&gt;
&lt;th width="200" class="table-filterable table-sortable:default"&gt;&lt;label&gt;Project Category&lt;/label&gt;&lt;/td&gt;
&lt;th width="200" class="table-filterable table-sortable:default"&gt;&lt;label&gt;Job Type&lt;/label&gt;&lt;/td&gt;  
&lt;th width="150" class="table-sortable:date"&gt;&lt;label&gt;Date Submitted&lt;/label&gt;&lt;/td&gt;
&lt;th width="150" class="table-sortable:date"&gt;&lt;label&gt;Due Date&lt;/label&gt;&lt;/td&gt;
&lt;th width="100" class="table-filterable table-sortable:default"&gt;&lt;label&gt;Status&lt;/label&gt;&lt;/td&gt;
&lt;th width="20"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;?

$i=0;
if(is_array($R)):
foreach ($R as $key=&gt;$val):?&gt;
&lt;tr bgcolor="&lt;?=getBGC($i)?&gt;"&gt;
&lt;td&gt;&lt;a href="#" onclick="getReqs('&lt;?=$R[$key]['JOB_NUMBER']?&gt;');return false;"&gt;&lt;?=$key?&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;?=$R[$key]['ANSWER']['Q_2']?&gt;&lt;/td&gt;&lt;!--requestor name--&gt;
&lt;td&gt;&lt;?=$R[$key]['ANSWER']['Q_5']?&gt;&lt;/td&gt;&lt;!--project name--&gt;
&lt;td&gt;&lt;?=$R[$key]['ANSWER']['Q_4']?&gt;&lt;/td&gt;&lt;!--project category--&gt;
&lt;td&gt;&lt;?=$R[$key]['ANSWER']['Q_25']?&gt;&lt;/td&gt;&lt;!--job specs--&gt;
&lt;td align="center"&gt;&lt;?=formatDate($R[$key]['R_DATE_SUBMITTED'],'y-m-d','m/d/y')?&gt;&lt;/td&gt;
&lt;td  align="center"&gt;&lt;?=$R[$key]['ANSWER']['Q_22']?&gt;&lt;/td&gt;&lt;!--due Date--&gt;

&lt;td  align="center"&gt;&lt;?=lookupChange($R[$key]['R_STATUS'])?&gt;&lt;/td&gt;
&lt;td width="20"&gt;
    &lt;?if($tKey):?&gt;
       &lt;a href="#" onclick="archiveRequest('&lt;?=$R[$key]['JOB_NUMBER']?&gt;');return false"&gt;&lt;img src="images/b_close.gif" border="0"&gt;&lt;/a&gt;
    &lt;?endif;?&gt;
    &lt;/td&gt;
&lt;/tr&gt;

&lt;?$i++;endforeach;endif;?&gt;
&lt;/table&gt;  
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;

&lt;/table&gt;    &lt;/center&gt;
</code></pre>
