Jump to content

[SOLVED] submit button??


ali_2kool2002

Recommended Posts

Hi im using the line below in a while loop, but i want to be able to select multiple submit buttons at one time so,but at the moment im not sure how to change the name of the button as it could be a while loop for x amount of times...i could count how manytimes i need to go throught the loop and then output the submit button but then how do i change the name in this loop automatically? does this help...im on here so ne qns just reply and il answer within a few secs...

 

while($i<$count && $results = mysql_fetch_array($result, MYSQL_ASSOC)){
<td align="center"><input type="radio" name= "txtbox[]" value = '.$orderId.'  unchecked> Selected</td>

 

 

Link to comment
https://forums.phpfreaks.com/topic/42114-solved-submit-button/
Share on other sites

problem is on a user level that i need to be able to select more than one submit button...but from my code i can only select one submit button at one time...this is due to the name being the same in the submit button code

name= "txtbox[]"

 

i need someone to be able to change the name for each submit button that is displayed every time the while loop goes round.

 

hope this helps? ??? ???

 

 

Link to comment
https://forums.phpfreaks.com/topic/42114-solved-submit-button/#findComment-204264
Share on other sites

Hello

 

This loop creates 10 submit button with different names.

$x =1;

while($x<=10)

{

    $button_name  =  "submit".$x;

  ?>

   

    <input type="submit" name="<?=$button_name ?>" value="Submit<?=$x?>">

   

  <?

}

 

 

 

 

Regards

Aniesh Joseph

Link to comment
https://forums.phpfreaks.com/topic/42114-solved-submit-button/#findComment-204269
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.