Jump to content

multiple checkboxes in a form


flemingmike

Recommended Posts

hello all,

 

im wondering if it is possible to have multiple check boxes that get created based on the number of rows in a table (one representing each row)

<input type='checkbox' name='approve[$tid]' value='ON'>

 

and then have a submit button at the bottom of the page that will find all of the checkboxes (it could be 1, or 100) and submit it to my form handling page.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/217121-multiple-checkboxes-in-a-form/
Share on other sites

for every returned row from mysql, it produces

 

  echo "<td align='center' nowrap>" . $tmechanic . "</td>";
  echo "<td align='center' nowrap>" . $tdate1 . "</td>";
  echo "<td align='center' nowrap>" . $tjobnumber . "</td>";
  echo "<td align='center'>" . $tdescription . "</td>";
  echo "<td align='center'>" . $tsignin1 . "</td>";  
echo "<td align='center'>" . $tfinish2 . "</td>";
echo "<td align='center'><input type='checkbox' name='approve[$tid]' value='ON'></td>";

 

and im hoping to have this on the last line:

 

 <form name="approve" method="POST" action="approve.php">
*** Find All My Checkboxes that are Checked And Submit ***
<input type="submit" value="Approve" name="update">
</form> 

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.