glenelkins Posted May 28, 2006 Share Posted May 28, 2006 HiOk I have created a quick test script (below) to create 10 dynamic text boxes and a submit button:[code]<form name="test" action="test2.php" method="post"><table> <? for ($i=0;$i<10;$i++){ ?> <tr> <td> Email: </td> </tr> <tr> <td> <input type="text" name="email[$i]"> </td> </tr> <? } ?><tr> <td> <input type="submit" name="button" value="Submit"> </td></tr></table></form>[/code]Now, how do i get the information from each text box?? I tried the following but dont seem to work:[code]foreach ($_POST[email] as $email) { echo $email . "<br>";}[/code]any ideas people?? cheers[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--][b]ITS OK FOUND THE PROBLEM ON THIS LINE: <input type="text" name="email[$i]">[/b][!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/10640-dynamic-_post-data/ Share on other sites More sharing options...
perezf Posted May 28, 2006 Share Posted May 28, 2006 What is it that you are exactly trying to make and then i can help? Quote Link to comment https://forums.phpfreaks.com/topic/10640-dynamic-_post-data/#findComment-39677 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.