Helpful Information
 
 
Category: Perl/ CGI
Form data into a database

Hi,
Is there a way for me to enter the data I have collected in a form directly into a database. We are using cgi/perl for the server side, the data presently comes into my email; I then copy and paste into an accerss dbase. There must be na easier way of doing this.
Thanks in advance....
pats

you could try somthing like this.

the dat file is in the same directory as the cgi script. and is chrom to 666

-------

in the cgi script put this


open(OUTF,">>NameOfDatabase.dat");

flock(OUTF,2);
seek(OUTF,0,2);

foreach $key (keys(%FORM)){
print OUTF " $key = $FORM{$key}\n";
}

close(OUTF);

-------

Hope this works for ya :D:D










privacy (GDPR)