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: webmster <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]

Reply via email to