Andrew R Posted June 8, 2007 Share Posted June 8, 2007 Hi How would I echo a particular amount of text fields depending on how many the user selects from a drop down menu that I have already created. For example say the user selects 4 or whatever other number from a drop down menu how would I echo 4 or whatever the amount of text fields for a user to input text into? An example would be an airline website were you select how many people are travelling and then it echo fields for those people to enter their names. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/54736-displaying-text-fields-on-user-input/ Share on other sites More sharing options...
MemphiS Posted June 8, 2007 Share Posted June 8, 2007 using a for statement. for($i=0; $i<=$postedVALUE; $i++){ echo(".. Content you wish to be echoed $postedVALUE times."); } Quote Link to comment https://forums.phpfreaks.com/topic/54736-displaying-text-fields-on-user-input/#findComment-270718 Share on other sites More sharing options...
Andrew R Posted June 8, 2007 Author Share Posted June 8, 2007 Thanks very much! Quote Link to comment https://forums.phpfreaks.com/topic/54736-displaying-text-fields-on-user-input/#findComment-270724 Share on other sites More sharing options...
Andrew R Posted June 8, 2007 Author Share Posted June 8, 2007 How would I now get that information from the fields that are being echoed to be entered into the database since the form name will be the same name? Quote Link to comment https://forums.phpfreaks.com/topic/54736-displaying-text-fields-on-user-input/#findComment-270758 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.