...

View Full Version : auto-create more textboxes?



boeing747fp
03-30-2004, 11:18 PM
is there a way to automatically have a certain amount of textboxes appear in a form based on a set number in the previous page? i have an admin panel that you can add an album to the database, and i have a dropdown menu where you can select that there are 1-25 tracks on the album you are adding... but i want it so when you click Continue, it shows that many textboxes for titles of the tracks... but i dont want to make all 25 fields 25 times in html

Mhtml
03-31-2004, 03:16 AM
Just use a loop, --



for ( $i = 0; $i < $numItems; $i++ ) {

$textBoxes .= "<input type=\"text\" name=\"text$i\"/>\n";

}


Or at least something along those lines. ..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum