checkbox array help needed

  • helloise
  • Born
  • Born
  • helloise
  • Posts: 3

Post 3+ Months Ago

i have the following code:
foreach($product_names as $product_row) { ?>
<td >&nbsp;</td><td width='200px'><?php echo $product_row->getName(); ?></td>
<td width='200px'><input type="checkbox" name="graphic[]" value="<?php $product_row?>" />
</td><td width='200px'><input type="checkbox" name="text[]" value="<?php $product_row?>" /></td>
<?php }

for each product i have a graphic and text checkbox
i can check both or one of them

how will i know which ones i checked for which product?????????? something like: please correct my code please

if (graphic[$product_row] = checked)
print "product".$product_row->getName()." graphic was checked";
if (text[$product_row] = checked)
print "product".$product_row->getName()." text was checked";

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 25 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.