PDA

View Full Version : Form data into a database


pats
07-12-2002, 05:05 PM
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

ACJavascript
07-12-2002, 11:40 PM
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