At 01:49 PM 4/30/00 -0400, Sam Carleton wrote:
>
>Tobias,
>
>I am looking into it right now, but you might be able to save me a lot
>of time. I want to display the name/values from the HTML form. How
>would I go about enumerating through the @params to do this?
>
>Sam
How bout this:
package Apache::POSTDisplay;
use strict;
use Apache::Constants qw(:common);
use Apache::Request ();
use Apache::Util ();
sub handler {
my $r = shift;
my $apr=Apache::Request->new($r);
$r->content_type('text/html');
$r->send_http_header;
return OK if $r->header_only;
my
$html=qq{<html><body><title>POSTDisplay</title><body><h1>POSTDisplay</h1><ul>};
foreach my $key ($apr->param) {
my $val=Apache::Util::escape_html($apr->param($key));
$html.=qq{<li>[$key] = [$val]\n};
}
$html.=qq{</ul>\n</body>\n};
$r->print($html);
return OK;
}
1;
Tobias