vikaspa Posted June 25, 2008 Share Posted June 25, 2008 Followinf code defines array of strings like uoom[] , qty[] , price[] However when i define cnfexmill[], as array is not defines ..please help me where I had gone wrong <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td width="9%" rowspan="2"><div align="center"><img src="<?php echo $ipth; ?>" width="25" height="25" /></div></td> <td width="14%" height="20"> <label></label> <div align="center"><span class="bodytextbold">Price per</span></div></td> <td width="24%"><div align="center"><strong>C&F or Ex Mill </strong></div></td> <td width="17%"><div align="center"><span class="bodytextbold">Currency :</span></div></td> <td width="14%"><div align="center"><span class="bodytextbold">Qty</span></div></td> <td width="22%" rowspan="2"><? if($allowcustsearch==1) { ?> √<a href="javascript:openNewWindow('product_quote_history.php?pid=<?php echo $rows2['pid']; ?>','win3');">Previous Quotes </a> <? } ?></td> </tr> <tr> <td><div align="center"> <input name="uom[]" type="text" id="uom[]" value="<?php echo $rows2['uom']; ?>" size="8" /> </div></td> <td><label> <div align="center"> <input name="cnfexmill[]" type="radio" id="cnfexmill[]" value="<?php echo $rows2['cnfexmill']; ?>" /> C&F <input name="cnfexmill[]" type="radio" id="cnfexmill[]" value="<?php echo $rows2['cnfexmill']; ?>" /> Exmill Floor </div> </label></td> <td><div align="center"> <input name="currency[]" type="text" id="currency[]" value="<?php echo $rows2['currency']; ?>" size="6" /> </div></td> <td><div align="center"><span class="bodytextbold"> </span> <?php if ($rows2['qty']=="") { $rows2['qty']=0; // echo $rows2['qty']; } ?> <input name="qty[]" type="text" id="qty[]" value="<?php echo $rows2['qty']; ?>" size="6" /> </div></td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/111853-define-array-of-radio-button/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 25, 2008 Share Posted June 25, 2008 Radio button (and checkbox) variables are only set if the radio button/checkbox are selected. Link to comment https://forums.phpfreaks.com/topic/111853-define-array-of-radio-button/#findComment-574147 Share on other sites More sharing options...
vikaspa Posted June 25, 2008 Author Share Posted June 25, 2008 Dear Sir What you say is true above code is generated when a database record is read for fields other than radio buttons the are identified individually In case of radio button if i cleck on radiob button for 1st record and later on other record the 1st record selection (check) is removed I want each pair of radio button to be distinctly identified or for each row the name should be fifferent Please help Link to comment https://forums.phpfreaks.com/topic/111853-define-array-of-radio-button/#findComment-574223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.