Etienne Marcotte <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> can you forward the html part again?
> I will test the exact same code on my machine, I'm sure it's gonna work, I
just
> checked the part of my script that reads data from my forms and it works
fine...
>
> My netscrap just converted to text and the only thing I see is the line
and the
> text
>
> Etienne
>
> [EMAIL PROTECTED] wrote:
>
> > 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]
>


begin 666 addlink.htm
M/"$M+2!S879E9"!F<F]M('5R;#TH,# R,BEH='1P.B\O:6YT97)N970N92UM
M86EL("TM/@T*/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(
M5$U,(#0N,"!4<F%N<VET:6]N86PO+T5.(CX-"CPA+2T@<V%V960@9G)O;2!U
M<FP]*# P-#8I:'1T<#HO+VUI8VAA96QP<F%T="YD>6YU+F-O;2]C;&%S<R]!
M9&1L:6YK+FAT;2 M+3X-"CQ(5$U,/CQ(14%$/CQ4251,13Y.97<@4&%G92 Q
M/"]4251,13X-"CQ-151!(&AT=' M97%U:78]0V]N=&5N="U4>7!E(&-O;G1E
M;G0](G1E>'0O:'1M;#L@8VAA<G-E=#UW:6YD;W=S+3$R-3(B/@T*/$U%5$$@
M8V]N=&5N=#TB35-(5$U,(#4N-3 N-#@P-RXR,S P(B!N86UE/4=%3D52051/
M4CX-"CQ-151!(&-O;G1E;G0]1G)O;G1086=E+D5D:71O<BY$;V-U;65N="!N
M86UE/5!R;V=)9#X\(2TM;7-T:&5M92TM/CQ,24Y+( T*:')E9CTB861D;&EN
M:U]F:6QE<R]T;W!O,3$Q,2YC<W,B('1Y<&4]=&5X="]C<W,@<F5L/7-T>6QE
M<VAE970^#0H\345402!C;VYT96YT/2)T;W!O(#$Q,3$L(&1E9F%U;'0B(&YA
M;64](DUI8W)O<V]F="!4:&5M92(^#0H\345402!C;VYT96YT/2)T;"P@9&5F
M875L="(@;F%M93TB36EC<F]S;V9T($)O<F1E<B(^/"](14%$/@T*/$)/1%D^
M/"$M+6US;F%V:6=A=&EO;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("(@<W1A<G1S<&%N("TM/@T*(" @(" @/%-#4DE05"!L86YG=6%G
M93U*879A4V-R:7!T('1Y<&4]=&5X="]J879A<V-R:7!T/CPA+2T*9G5N8W1I
M;VX@1G)O;G1086=E7T9O<FTQ7U9A;&ED871O<BAT:&5&;W)M*0I["@H@(&EF
M("AT:&5&;W)M+F5M86EL+G9A;'5E(#T]("(B*0H@('L*(" @(&%L97)T*")0
M;&5A<V4@96YT97(@82!V86QU92!F;W(@=&AE(%PB96UA:6Q<(B!F:65L9"XB
M*3L*(" @('1H949O<FTN96UA:6PN9F]C=7,H*3L*(" @(')E='5R;B H9F%L
M<V4I.PH@('T*"B @:68@*'1H949O<FTN9&5S8W)I<'1I;VXN=F%L=64@/3T@
M(B(I"B @>PH@(" @86QE<G0H(E!L96%S92!E;G1E<B!A('9A;'5E(&9O<B!T
M:&4@7")D97-C<FEP=&EO;EPB(&9I96QD+B(I.PH@(" @=&AE1F]R;2YD97-C
M<FEP=&EO;BYF;V-U<[EMAIL PROTECTED]@(" @<F5T=7)N("AF86QS92D["B @?0H*("!I
M9B H=&AE1F]R;2YD97-C<FEP=&EO;BYV86QU92YL96YG=&@@/B R-38I"B @
M>PH@(" @86QE<G0H(E!L96%S92!E;G1E<B!A="!M;W-T(#(U-B!C:&%R86-T
M97)S(&EN('1H92!<(F1E<V-R:7!T:6]N7"(@9FEE;&0N(BD["B @("!T:&5&
M;W)M+F1E<V-R:7!T:6]N+F9O8W5S*"D["B @("!R971U<FX@*&9A;'-E*3L*
M("!]"B @<F5T=7)N("AT<G5E*3L*?0HO+RTM/CPO4T-225!4/@T*/"$M+7=E
M8F)O="!"3U0](D=E;F5R871E9%-C<FEP="(@96YD<W!A;B M+3X-"B @(" @
M(#Q&3U)-(&QA;F=U86=E/4IA=F%38W)I<'0@;F%M93U&<F]N=%!A9V5?1F]R
M;3$@#0H@(" @("!O;G-U8FUI=#TB<F5T=7)N($9R;VYT4&%G95]&;W)M,5]6
M86QI9&%T;W(H=&AI<RDB( T*(" @(" @86-T:6]N/6AT=' Z+R]M:6-H865L
M<')A='0N9'EN=2YC;VTO8V=I+6)I;B]P<F]C97-S7V9O<FTN<&P@;65T:&]D
M/7!O<W0^#0H@(" @(" \2%(^#0H-"B @(" @(#Q0/D-A=&5G;W)Y.CQ314Q%
M0U0@<VEZ93TQ(&YA;64]0V%T96=O<GD^(#Q/4%1)3TX@=F%L=64]0G5S:6YE
M<W,@#0H@(" @(" @('-E;&5C=&5D/D)U<VEN97-S/"]/4%1)3TX^(#Q/4%1)
M3TX@=F%L=64]4&5R<V]N86P^4&5R<V]N86P\+T]05$E/3CX@#0H@(" @(" @
M(#Q/4%1)3TX@=F%L=64]161U8V%T:6]N86P^161U8V%T:6]N86P\+T]05$E/
M3CX@/$]05$E/3B -"B @(" @(" @=F%L=64]5'5T;W)I86QS/E1U=&]R:6%L
M<SPO3U!424]./B \3U!424].( T*(" @(" @=F%L=64]3W1H97(^3W1H97(\
M+T]05$E/3CX\+U-%3$5#5#XF;F)S<#LF;F)S<#LF;F)S<#LF;F)S<#LF;F)S
M<#L@55),.B -"B @(" @(#Q)3E!55"!S:7IE/30S('9A;'5E/6AT=' Z+R\@
M;F%M93UU<FP^/"]0/@T*(" @(" @/% ^16UA:6PZ(#PA+2UW96)B;W0@8F]T
M/2)686QI9&%T:6]N(B!"+59A;'5E+5)E<75I<F5D/2)44E5%(B M+3X\24Y0
M550@#0H@(" @("!S:7IE/3(U(&YA;64]96UA:6P^/"]0/@T*(" @(" @/% ^
M*$YO=&4Z(%EO=7(@96UA:6P@=VEL;"!O;FQY(&)E('5S960@=&\@;F]T:69Y
M('EO=2!W:&5N('EO=7(@;&EN:R!H87,@#0H@(" @("!B965N(&%D9&5D+BD\
M+U ^#0H@(" @(" \4#X\(2TM=V5B8F]T(&)O=#TB5F%L:61A=&EO;B(@0BU6
M86QU92U297%U:7)E9#TB5%)512(@22U-87AI;75M+4QE;F=T:#TB,C4V(@T*
M(" M+3X\5$585$%214$@;F%M93UD97-C<FEP=&EO;B!C;VQS/3$P-#X\+U1%
M6%1!4D5!/CPO4#X-"B @(" @(#Q0/CQ)3E!55"!T>7!E/7-U8FUI="!V86QU
M93U3=6)M:70@;F%M93U3=6)M:71?9F]R;3X\24Y0550@='EP93UR97-E="!V
M86QU93U297-E="!N86UE/4(R/CPO4#X\+T9/4DT^)FYB<W [/"$M+6US;F%V
M:6=A=&EO;BTM/CPO5$0^/"]44CX\(2TM;7-N879I9V%T:6]N+2T^/"]40D]$
:63X\+U1!0DQ%/CPO0D]$63X\+TA434P^#0H`
`
end


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

Reply via email to