Help with redirecting HTML form input 
Author Message
 Help with redirecting HTML form input

Subject: Help with redirecting HTML form input

Date: Fri, 27 Jan 1995 21:15:05 GMT

writes:

Quote:

>I need help redirecting HTML form input into a database. I have a form
>that has several fields, and I have the data from the fields mailed to my
>mailbox. In the same form I also want the data to be directed into a
>database file for later manipulation.

>When I get my mail it looks like this

>from= joe
>comany= Anything, Inc.
>phone= 534-5673

>That's ok. But the data in the in database file looks exactly like
> the above mail example. I  want the database file to fill up with
>ONLY the data that the user inputs, like as follows:

>joe
>anything, Inc.
>534-5673

Here's what I use to split the name/value pairs. It's a standard routine
adapted from the OReilly book _Managing Internet Information Services_.
The rest of my script does two things:
1) mails the form info to a mailbox at my site and a copy to the
respondee; and, 2) tab delimits the values and puts them into a database
file. If you'd like to see the whole thing, please email me directly.
Good Luck.
------------------------------------------------------
#check that POST method is used
if ($ENV{'REQUEST_METHOD'} eq 'POST') {

                # Get the input

    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

                # Split the name-value pairs on '&'


                # Load the FORM variables


        ($name, $value) = split(/=/, $pair);
        $value =~ tr/+/ /;
        $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

        $FORM{$name} = $value;
    }
----------------------------------------------------
Yours,
Jeff Aldrich
University of Minnesota



Fri, 18 Jul 1997 00:46:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Removing carriage returns from HTML form inputs

2. Un-escaping html form inputs

3. Input from a pop-up html form

4. need to retrieve html form input type data

5. need to retrieve html form input type data

6. Input via HTML - FORMS (perl-cgi)

7. PERL script to Mail input from HTML form

8. HELP with accessing HTML page to automate Login using HTML::Form

9. need help with redirect after form submission.

10. need help with redirect after form submission.

11. help!!-script to read and output the input from Mosaic Forms

12. Need help changing form input to leading caps on certain entries

 

 
Powered by phpBB® Forum Software