Gossamer Forum
Home : General : Perl Programming :

Re: Is this possible, Enter multi. records on 1 submit

Quote Reply
Re: Is this possible, Enter multi. records on 1 submit In reply to
Here's one way...
Code:
use CGI qw(:standard);
my (@name, @address) = (param('name'), param('address'));
open (DB, ">test.db") or die $!;
flock (DB, 2);
for (my $i; $i < 10; $i++) {
last unless ($name[$i] and $address[$i]);
print DB, join "|", (($i + 1), $name[$i], $address[$i]), "\n";
}
close DB;
Happy coding,

--Drew
http://www.camelsoup.com
ftp://ftp.camelsoup.com
Subject Author Views Date
Thread Is this possible, Enter multi. records on 1 submit jcrow 3316 Jul 31, 2001, 9:47 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
Paul 3161 Jul 31, 2001, 10:27 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3146 Jul 31, 2001, 10:52 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
sponge 3118 Jul 31, 2001, 9:10 PM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3136 Aug 2, 2001, 4:41 AM
Thread Re: Is this possible, Enter multi. records on 1 submit
jcrow 3122 Aug 2, 2001, 6:35 AM
Post Re: Is this possible, Enter multi. records on 1 submit
sponge 3081 Aug 2, 2001, 3:39 PM