in reply to Re: Problem with getting POST request data with Apache::Request object
in thread Problem with getting POST request data with Apache::Request object

Here's the full program that i was trying to run and the HTML content.

use Apache::Request; use CGI; my $apr= Apache::Request->new(shift); my $page = new CGI; my $test=$apr->param('school'); print $page->header(); print("Post Data " . $test);

HTML content

<html> <head></head> <body> <form method=Post action='test.pl' > <input type=text name='school' value='test'> <input type=submit value='Ok'> </form> </body> </html>

mod_perl configuration in http.conf

Alias /perl/ /usr/local/apache/cgi-bin/ PerlModule Apache::Registry <Location /perl/> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader On allow from all </Location>

Apache version is 1.3.

Replies are listed 'Best First'.
Re^3: Problem with getting POST request data with Apache::Request object
by kwaping (Priest) on Aug 08, 2006 at 15:08 UTC
    Try this instead, see what happens:
    my $test = $page->param('school');

    ---
    It's all fine and dandy until someone has to look at the code.

      Yes, I could access the POST data using the CGI object.
      That is,
      my $test = $page->param('school');
      gave me the result - 'test'.

      Thilani