David Romero wrote:
David Romero wrote:

Victor wrote:

I use the last version of perl-CGI.
When I transmit the variables using the get method it works($cgi->param(<variable>) returns the correct value).
When I transmit the variables using the post method it I receive a empty string(($cgi->param(<variable>) is empty).


If I try to receive the variables using post method, but without the perl-CGI($ENV{CONTENT_LENGHT}...) - then it works.

Thank you.




The POST data can be read one time, if you create an cgi objet before these, the second object recibe empty data.
Is posible than one of your use modules read the post data frist.




Im fix the problem with the standatd pragma.

use CGI qw/standad/;
my $value = param("post_var");


sorry the correct syntaxis is
use CGI qw/:standard/;
my $value = param("post_var");



it sounds more like he's doing

use CGI;

my $cgi = CGI->new();

since he clearly illustrates the use of the object-oriented syntax in his example and in which case you want to get the params AFTER creating the cgi-object

my %params = $cgi->Vars;

which ensures that you also get multi-value <select>s as separate values. too.

--
Scott R. Godin
Laughing Dragon Services
www.webdragon.net

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to