Something must not be reading right. I still get the same result from the
category. A blank. Everything else is there though.

Mike



Etienne Marcotte <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> By the way I had a unknown host with me.com...
>
> Try this, if it works, it's in your cgi-lib.pl the problem.. ( I removed
> comments and added some where I made mods)
>
> #!/usr/bin/perl
> use CGI; # use the CGI module to parse instead of your cgi-lib...
> use strict; #always use strict, it's a good coding habit
>
> my $logfile = "/usr/local/apache/cgi-bin/log/logfile.log";
> my $mailprog = "/usr/sbin/sendmail";
>
> my $q = new CGI;
> $q->import_names('in'); #imports the names in package 'in', I use this one
> because it's 2 less chars to type when accessing a value:-P
>
> print "Content-type: text/html\n\n";
>
> print<<END; #don't have to make 2340893 print statements
> <html><head>
> <title>Thank you!</title>
> </head>
> <body>
> <p>Thanks $in::email<br>
> Category $in::category
> URL: $in::url
> Description: $in::description
> I'll inform you when your link has been added
> </p>
> </body></html>
> END
>
> open(FILE, ">$logfile") || die "I can't open $logfile\n";
> print FILE "Someone requested a link addition\n";
> print FILE "Category $in::category\n";
> print FILE "E-mail $in::email\n";
> print FILE "URL $in::url\n";
> print FILE "Description $in::description::\n\n";
> close(FILE);
>
> open(MAIL, "| $mailprog -t") || die "I can't open $mailprog\n";
> print MAIL "To: webmaster <webmaster\@yourname.com>\n";
> print MAIL "From: $in::email\n";
> print MAIL "Subject: Link Request\n";
> print MAIL "Someone requests a link addition\n";
> print MAIL "Category: $in::category\n";
> print MAIL "URL: $in::url\n";
> print MAIL "Description: $in::description\n";
> close(MAIL);
>
> =====
>
> Mine was working fine with your same code when using my read_parse sub...
>
> You can try also to replace the ReadParse sub in cgi-lib.pl by this one:
>
> =====
>
> sub ReadParse
> {
> my %in;
> my ($request_method, $query_string, @key_value_arr, $key_value, $key,
$value);
>
>     $request_method = $ENV{'REQUEST_METHOD'};
>     if ($request_method eq "GET") {
>         $query_string = $ENV{'QUERY_STRING'};
>     } elsif ($request_method eq "POST") {
>    read (STDIN, $query_string, $ENV{'CONTENT_LENGTH'});
>     } else { die "server uses an unknown method"; }
>     @key_value_arr = split (/&/, $query_string);
>     foreach $key_value (@key_value_arr) {
>         ($key, $value) = split (/=/, $key_value);
>         $value =~ tr/+/ /;
>         $value =~ s/%(..)/pack("c", hex($1))/eg;
>         if (defined($formdat{$key})) {
>             $in{$key} .= "\0" . $value;
>         } else {
>             $in{$key} = $value;
>         }
>     }
> return %in;
> }
>
> =====
> and then use the exact same code of the beginning but change
>
> &ReadParse;
> by
> my %in = &ReadParse;
>
> Etienne
>
> Mike wrote:
>
> > I am using cgi-lib.pl this is the script that I am using.
> >
> > #!/usr/bin/perl
> >
> > #location to your log file.
> > $logfile = "/usr/local/apache/cgi-bin/log/logfile.log";
> >
> > #location of our sendmail program.
> > $mailprog = "/usr/sbin/sendmail";
> >
> > #path to cgi-lib.pl.
> > $library = "/usr/local/apache/cgi-bin";
> >
> > require "$library/cgi-lib.pl";
> >
> > &ReadParse;
> >
> > # Print the http header
> > print "Content-type: text/html\n\n";
> >
> > # Send the user a thank you
> > print "<html>\n";
> > print "<head>\n";
> > print "<title>Thank you!</title>\n";
> > print "</head>\n";
> > print "<body>\n";
> > print "<p>Thanks $in{'email'}<br>\n";
> > print "Category $in{'category'}\n";
> > print "URL: $in{'url'}\n";
> > print "Description: $in{'description'}\n";
> > print "I'll inform you when your link has been added\n";
> > print "</p></body></html>\n";
> >
> > # Open the log file and write the data
> > open(FILE, ">$logfile") || die "I can't open $logfile\n";
> > print FILE "Someone requested a link addition\n";
> > print FILE "Category $in{'category'}\n";
> > print FILE "E-mail $in{'email'}\n";
> > print FILE "URL $in{'url'}\n";
> > print FILE "Description $in{'description'}\n";
> > print FILE "\n";
> > close(FILE);
> >
> > # Open the sendmail program and pipe the data
> > open(MAIL, "| $mailprog -t") || die "I can't open $mailprog\n";
> > print MAIL "To: webmaster <webmaster\@yourname.com>\n";
> > print MAIL "From: $in{'email'}\n";
> > print MAIL "Subject: Link Request\n";
> > print MAIL "Someone requests a link addition\n";
> > print MAIL "Category: $in{'category'}\n";
> > print MAIL "URL: $in{'url'}\n";
> > print MAIL "Description: $in{'description'}\n";
> > close(MAIL);
> >
> > Thanks again
> >
> > Mike
> >
> > Etienne Marcotte wrote:
> >
> > > The CGI (or other parsing sub) reads the data selected from the drop
> > > down, which is in the "value" part of each <option> tag.
> > >
> > > <select name="dropdown">
> > > <option value="1">option 1</option>
> > > <option value="2">option 2</option>
> > > <option value="3">option 3</option>
> > > </select>
> > >
> > > then in your param{'dropdown'}you should have 1, 2 or 3 depending on
the
> > > option that he choose.
> > >
> > > What are you using to parse the data? CGI.pm ? That is probably
causing
> > > the problem because your html seems right
> > >
> > > Etienne
> > >
> > > Bogus email wrote:
> > >
> > > > Sorry bout that... I do mean <select> drop-downs from HTML. What I
> > > > want to
> > > > do is have it email me all the info, which it does email me.
> > > > Everything but
> > > > the dropdown menu information.  see attached.
> > > >
> > > > Thanks again...
> > > >
> > > > Mike
> > > >
> > > >
> > > >
> > > > "Curtis Poe" <[EMAIL PROTECTED]> wrote in message
> > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > > --- [EMAIL PROTECTED] wrote:
> > > > > > Hello all,
> > > > > >
> > > > > > I am trying to process a menu option but for some reason perl
> > > > causes the
> > > > > > value to come up blank can anyone help? This is only hapening on
> > > > the
> > > > menu
> > > > > > items.
> > > > > >
> > > > > > Is there a trick to sending drop down menus?
> > > > > >
> > > > > > TNX,
> > > > > >
> > > > > > Mike
> > > > >
> > > > > Mike,
> > > > >
> > > > > What do you mean by "menu"?  Are you referring to Perl::Tk menus?
> > > > Win32::Gui?  Perhaps you mean
> > > > > <select> drop-downs from HTML?  Can you post some sample code?  We
> > > > need a
> > > > lot more information
> > > > > before we can help you.
> > > > >
> > > > > Show us what you have.  Tell us what you expect.  Tell us what you
> > > > are
> > > > actually getting.  That's
> > > > > usually a good start.
> > > > >
> > > > > Cheers,
> > > > > Curtis "Ovid" Poe
> > > > >
> > > > > =====
> > > > > Senior Programmer
> > > > > Onsite! Technology (http://www.onsitetech.com/)
> > > > > "Ovid" on http://www.perlmonks.org/
> > > > >
> > > > > __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Make a great connection at Yahoo! Personals.
> > > > > http://personals.yahoo.com
> > > >
> > > >
> > > >
> > > >
> > >                              [Add your link]
> > >                              [ Home ] [ Up ]
> > > >
> >
  ------------------------------------------------------------------
> > >
> > >       Category:      URL:
> > >
> > >       Email:
> > >
> > >       (Note: Your email will only be used to notify you when your link
> > >       has been added.)
> > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to