Jump to content

Simple Question about CheckBoxes


needs_upgrade

Recommended Posts

Hello guys!

 

I'm not used to checkboxes and I have this code:

 

$sql = "SELECT purchase_id, or_num, DATE_FORMAT(delivery_date, '%b %e, %Y'), line_total, balance

FROM purchases

WHERE supplier_id='$supplier_id' AND cancelled=0 AND balance > 0

ORDER BY purchase_id DESC";

$sres = mysql_query($sql);

$snum = mysql_num_rows($sres);

if ($snum > 0) {

print "<center><table class=data width=400 border=1><thead class=data>";

print "<tr><td align=center colspan=5>Payable Purchases From Supplier</td></tr>";

print "<tr>

<td align=center width=30></td>

<td align=center width=70>O.R. #</td>

<td align=center width=100>Delivery Date</td>

<td align=center width=100>Line Total</td>

<td align=center width=100>Balance</td>

</tr></thead><tbody class=data>";

while ($srow = mysql_fetch_array($sres)) {

print "<tr>

<td align=center><input type=checkbox name=pid value=$srow[0]></td>

<td align=center><a class=tddata href='purchase.php?purchase_id=$srow[0]'>$srow[1]</a></td>

<td align=center>$srow[2]</td>

<td align=right>"; $linet = number_format($srow[3], 2); print "$linet</td>

<td align=right>"; $bal = number_format($srow[4], 2); print "$bal</td>

</tr>";

}

}

print "<tr><td align=center colspan=5>

<input type=hidden name=supplier_id value='$supplier_id'>

<input type=submit value=Submit></td></tr>";

print "</tbody></table></form></center>";

 

 

My question is, how can i catch all the purchase_ids when i click the submit button? Thanks so much guys.

 

Link to comment
https://forums.phpfreaks.com/topic/118753-simple-question-about-checkboxes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.