hi,
i want to develop a application....
where the user can enter the no of text boxes he wants..in the next page based on the user input it should disply the text boxes with different id
lydia21
9
Junior Poster
Recommended Answers
Jump to PostSay, for example, the user enters 10 in the first screen. On the next screen, you can do something like,
$textboxes_number=$_POST['number']; //the number of textboxes the user wants $textboxes_number=10; //say user enters 10 in the previous screen echo "<form name=form method=post action=somepage.php>"; for($i=0;$i<$textboxes_number;$i++){ echo "<input type='text' name=txt$i>"; …
Jump to PostHave a hidden field to pass the number of textboxes. In the next page, use a for loop to get the values entered in those textboxes.
for($i=0;$<$number_of_textboxes;$i++){ $txtboxname=$txt.$i; $textbox_value=$_POST[$txtboxname]; print $textbox_value; }
:)
Jump to Postcode ?
All 10 Replies
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
fatihpiristine
lydia21
9
Junior Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
lydia21
9
Junior Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
rudevils
0
Junior Poster in Training
kings
-7
Junior Poster
rudevils
0
Junior Poster in Training
lydia21
9
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.