"Jeffrey W. Baker" wrote:
>
> On Sat, 29 Apr 2000, Sam Carleton wrote:
>
> > #! /usr/bin/perl
> >
> > #cgi-lib.pl was optained from http://cgi-lib.berkeley.edu/
> > require "cgi-lib.pl";
>
> If we can erradicate polio and small pox, surely there must be a way to
> rid the world of cgi-lib.pl. Apparently it can still strike the young,
> elderly, and infirm. What a senseless waste.
>
> -jwb
>
> PS. If Mr. Carleton is not in too much of a hurry, I would advise him to
> look into the modern software available on CPAN, such as Apache.pm, which
> comes with mod_perl, and Apache::Request, which is available at
> http://www.perl.com/CPAN/modules/by-module/Apache/.
Ok, So cgi-lib.pl isn't the greatest in the world, but it did help me
get a big farther in my project:) Now I need something that works. I
have "Writing Apache Modules with Perl and C", but have not read too
deep into it and time is very short. Again, all I am trying to do is
print out ALL the name/values that was on the form. The code I have so
far does not display any of the name/values, Below is my code, could
someone please show me what I am doing wrong and how do I fix it?
package Apache::POSTDisplay;
use strict;
use Apache::Constants qw(:common);
sub handler {
my $r = shift;
$r->content_type('text/html');
$r->send_http_header;
$r->print(<<HTTP_HEADER);
<HTML>
<TITLE>POSTDisplay</TITLE>
<BODY>
<H1>POSTDisplay</H1>
<UL>
HTTP_HEADER
my @args = ($r->args, $r->content);
while(my($name,$value) = splice @args,0,2) {
$r->print("<li>[$name]=[$value]</li>\n");
}
$r->print(<<HTTP_FOOTER);
</UL>
</BODY></HTML>
HTTP_FOOTER
return OK;
}
1;
__END__