Hi,
I have a checkbox array containing the id of a record in a MySQL database.
The checkboxes are created dynamically depending on what is stored in the
database. I want to send the checkbox array to my stop_subscripti ons.php
file, running the code on all checked boxes, however I dont seem to be able
to actually send the array, I was hoping that someone could steer me in the
right direction.
Cheers,
Paul
<?php
$sql = "SELECT i.type, i.title , s.inj_id FROM inj_subscriptio n s,
injustices i WHERE s.member_id = '$user' AND i.inj_id = s.inj_id AND
s.inj_id IS NOT null" ;
$result = mysql_query($sq l);
$row = mysql_fetch_ass oc($result) ;
if ($row) {
echo "<div><span>Spe cific Subsriptions:</span><br/>" ;
$table_start ='<table width="90%" table name="table2" align="center"
cellspacing="0" border="0">
<tr>
<form method="post" action="stop_su bscription.php" >
<th width="20%">Typ e</th>
<th width="70%">Tit le</th>
<th width="10%"></th>
<input type="submit" name="Submit" value="Submit"
style="font-size:10px"/><p>
<input type="hidden" name="stop_subs cription"
value="1"/>
</form>
</tr>';
echo $table_start;
$rownum = 0;
while($row) {
$rownum++;
$style = rowcolor($rownu m);
$table_rows .= '<td id="td" align="center"
style="'.$style .';padding:5px; " >'."\n".'<form> <input type="checkbox"
name="deletethi s[]" value="'.$row['inj_id'] . '"></form></td>'."\n\t";
echo "<tr>" . $table_rows . "</tr>";
$row = mysql_fetch_ass oc($result) ;
}
echo '</table><Br/></div><br/>';
}
?>
I have a checkbox array containing the id of a record in a MySQL database.
The checkboxes are created dynamically depending on what is stored in the
database. I want to send the checkbox array to my stop_subscripti ons.php
file, running the code on all checked boxes, however I dont seem to be able
to actually send the array, I was hoping that someone could steer me in the
right direction.
Cheers,
Paul
<?php
$sql = "SELECT i.type, i.title , s.inj_id FROM inj_subscriptio n s,
injustices i WHERE s.member_id = '$user' AND i.inj_id = s.inj_id AND
s.inj_id IS NOT null" ;
$result = mysql_query($sq l);
$row = mysql_fetch_ass oc($result) ;
if ($row) {
echo "<div><span>Spe cific Subsriptions:</span><br/>" ;
$table_start ='<table width="90%" table name="table2" align="center"
cellspacing="0" border="0">
<tr>
<form method="post" action="stop_su bscription.php" >
<th width="20%">Typ e</th>
<th width="70%">Tit le</th>
<th width="10%"></th>
<input type="submit" name="Submit" value="Submit"
style="font-size:10px"/><p>
<input type="hidden" name="stop_subs cription"
value="1"/>
</form>
</tr>';
echo $table_start;
$rownum = 0;
while($row) {
$rownum++;
$style = rowcolor($rownu m);
$table_rows .= '<td id="td" align="center"
style="'.$style .';padding:5px; " >'."\n".'<form> <input type="checkbox"
name="deletethi s[]" value="'.$row['inj_id'] . '"></form></td>'."\n\t";
echo "<tr>" . $table_rows . "</tr>";
$row = mysql_fetch_ass oc($result) ;
}
echo '</table><Br/></div><br/>';
}
?>
Comment