
Zhris
Enthusiast
Apr 6, 2011, 1:32 AM
Post #14 of 15
(7561 views)
|
Re: [bhumika] Submit PHP form to perl script
[In reply to]
|
Can't Post
|
|
Then it looks as if the Perl library didn't install properly, although I don't have any knowledge of XAMPP specifically. Maybe try re-installing XAMPP, or search for related issues. Here is the dirty example, which should work, but its like re-inventing the wheel:
#!H:/xampp/perl/bin/perl sub xcgi_InitForm { my($h) = '[a-fA-F0-9]'; my($buff, @params, $param); my($param_name, $param_value); local(*xcgi_form) = @_ if @_; read(STDIN, $buff, $ENV{'CONTENT_LENGTH'}); @params = split(/&/, $buff); foreach $param (@params) { ($param_name, $param_value) = split(/=/, $param); $param_value =~ tr/+/ /; $param_value =~ s/%($h$h)/pack("C",hex($1))/eg; $xcgi_form{$param_name} = $param_value; } } { my(@form); xcgi_InitForm(*form); $mytextarea = $form{'mytextarea'}; print "content-type: text/html\n\n"; print "$mytextarea"; } Chris
|