shadiadiph Posted May 16, 2009 Share Posted May 16, 2009 can anyone tell me how to do this can't think I have a form submit field echo '<tr><td class="file"><input type="file" name="fileatt[]" value="" /></td><td class="picdes"><input type="text" name="desfileatt[]" value="" /></td></tr>'; I want to allow it to repeat a maximum of 4 times on the first submit but so i can change the value of the maximum amount of times it is shown for a second submit depending on how many files have been uploaded i was thinking about using for $i=0 but not sure how to do this with a form element can anyone point me in the right direction? Link to comment https://forums.phpfreaks.com/topic/158359-solved-form-multiple-submit-field-with-maximum-value/ Share on other sites More sharing options...
shadiadiph Posted May 16, 2009 Author Share Posted May 16, 2009 worked it out <?php $max_no_img=4; for($i=1; $i<=$max_no_img; $i++){ echo '<tr><td images <td class="file"><input type="file" name="fileatt[$i]" value="" /></td></tr>'; } ?> Link to comment https://forums.phpfreaks.com/topic/158359-solved-form-multiple-submit-field-with-maximum-value/#findComment-835169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.