
Borderline
Deleted
Jan 9, 2000, 3:17 PM
Post #5 of 13
(12293 views)
|
Re: Creating a %input from a web form.
[In reply to]
|
Can't Post
|
|
Try this: <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> use CGI; $c = new CGI; if(defined ($c->param('admin')) && $c->param('admin') eq 'admin')){ open FILE,$file or die "Could not open $file: $!"; $i = 1; while (<FILE> ) { print qq~<input type="text" name="org$i" size="20" value="$_">~; $i++; } print "<INPUT type=hidden name=num value=$i>"; close FILE; </pre><HR></BLOCKQUOTE> And to retrive the values try this:<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> for (1..$c->param('num')) { print $c->param("org$_"),"\n"; }</pre><HR></BLOCKQUOTE> This should print all the values submited. Ofcoarse you could do other things with them like push them into an array etc... Let me know if this helped, Scott
|