Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •