Oh, that's a different question.  You're not asking for a text file to
be returned.  You're asking for the contents of an uploaded text file to
be shown.  Entirely different.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jerry Kassebaum
Sent: Monday, December 04, 2006 8:05 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: Re: File Upload

>Can u restate the question?

Sure.

Take a look at http://biblescramble.com/dns/textArea04.cgi.

If a visitor enters text in the top text box and hits "submit query",
the 
next page returns what was typed in .

I'd also like the visitor to be able to send in a text file from his
hard 
drive and have that returned on the next page.

Here, again, is the code.

########

#!/usr//bin/perl -T


use strict;
use CGI qw/:standard/;

print header;

if(param('textAreadomains'))    {
        print start_html('Hi'),
        start_multipart_form,
        h1, param('textAreadomains'),
        p,
        end_form,
        hr;
                                }

        elsif(param('fileDomains'))     {
        print start_html('Hi'),
        start_multipart_form,
        h1, param('fileDomains'),
        p,
        end_form,
        hr;
                                        }

        else    {
        print start_html('Hi'),
        start_multipart_form,
        h1 "Enter domain names, one per line: ", textarea(-name,
                'textAreadomains', -rows, "15", -cols, "75"),
        p,
        submit,
        hr,
        h1, "Or upload a text file: ",
        start_multipart_form,   # This line was added
        filefield(-name, 'fileDomains'),
        submit,
        end_form,
        p,
        hr;
                }


        print end_html;
        exit;

########

_________________________________________________________________
Fixing up the home? Live Search can help 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&loca
le=en-US&source=hmemailtaglinenov06&FORM=WLMTAG

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to