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
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> 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.