array of radio buttons

From: Date: Tue, 25 Jun 2002 23:58:41 +0000
Subject: array of radio buttons
Groups: php.general 
Request: Send a blank email to php-general+get-103855@lists.php.net to get a copy of this message
I have a form that I would like to pass to a php script that contains a "grid" of text fields using the array syntax like: printf( "<TD align='right'>" ); printf( "<INPUT type='text' name='stick_price[]' size=5 value='$row[stick_price]' >" ); printf( "</TD>" ); printf( "<TD align='right'>" ); printf( "<INPUT type='text' name='weight_price[]' size=5 value='$row[weight_price]' >" ); printf( "</TD>" ); I would also like to have a radio button for each row and cannot figure out how to pass an array of radio buttons (as I can with check boxes) as the radio group needs to have a unique nae for each row. It doesn't appear that the following works: printf( "<TD align='right'>" ); echo "<input type=radio name=payment_type[] value='MBF' SELECT>MBF\n"; echo "<input type=radio name=payment_type[] value='TON'>TON\n"; printf( "</TD>" ); I'm about to give up and just use a checkbox ( as I have code to pull out a list of check boxes) but I would have to generate some code to ensure that only one check box is selected. ugh. Any suggestions? Jeff. -- Jeff D. Hamann Hamann, Donald & Associates, Inc. PO Box 1421 Corvallis, Oregon USA 97339-1421 Bus. 541-753-7333 Cell. 541-740-5988 jeff_hamann@hamanndonald.com www.hamanndonald.com

« previous php.general (#103855) next »