Page 1 of 1

inputs

Posted: Sun May 05, 2002 1:29 pm
by hob_goblin
im wondering how I could have a user type in a number and that many input fields pop up with a number corresponding to it...like

i would type in 5, press submit, and

1. <input field>
2. <input field>
3. <input field>
4. <input field>
5. <input field>

would come up...

Posted: Sun May 05, 2002 1:44 pm
by chiefmonkey
Try something like

<?php

$num=5;

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

print("<input type>");

}

?>

HTH

George

Posted: Sun May 05, 2002 2:08 pm
by hob_goblin
let me explain a little more, ok i want to make a little template that contains the set of my links...so i dont have to keep editing the big file,

i want to be able to write out each link to a file, so the file has every single link in it, and i want to be able to add to it whenver i feel like it, or take a link away from it

Posted: Sun May 05, 2002 5:51 pm
by dusty
you might want to look into using a real database rather than flat files, you'll find in the long run it's a lot easier.

Posted: Sun May 05, 2002 6:00 pm
by hob_goblin
i dont know practically anything about mysql though :oops:

Posted: Sun May 05, 2002 8:12 pm
by jason
hob_goblin wrote:i dont know practically anything about mysql though :oops:
SQL Tutorial online
http://www.sqlcourse.com

PHP & MySQL
http://www.newbienetwork.net/content.php?id=3

And I will have another tutorial up shortly. And there are many on the net for PHP and MySQL.

Trust me, spend the time to learn it now, and you will be so glad you did.