View Full Version : auto-create more textboxes?

03-31-2004, 12:18 AM
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

03-31-2004, 04: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. ..