in reply to enctype problem in CGI

It works fine for me. IE:
print $q->start_form(-method => 'POST', -action=>"myAction.pl"); # <form method="post" action="myAction.pl" # enctype="application/x-www-form-urlencoded"> print $q->start_form( -method => 'POST', -enctype => &CGI::URL_ENCODED, -action=>"myAction.pl"); # <form method="post" action="myAction.pl" # enctype="application/x-www-form-urlencoded"> and print $q->start_form( -method => 'POST', -enctype => &CGI::MULTIPART, -action=>"myAction.pl"); # <form method="post" action="myAction.pl" enctype="multipart/form-dat +a">
I noticed that your output has two enctype attributes and your for has a POST method but your code does not have it. I doubt that the output is from your code.
Boris

Replies are listed 'Best First'.
Re^2: enctype problem in CGI
by chas (Priest) on Mar 27, 2005 at 00:47 UTC
    I get the method="post" with the OP's code. That seems to be the default if you didn't specify a method, at least in the version of CGI.pm that I have (2.752 I believe.)
    chas
Re^2: enctype problem in CGI
by macPerl (Beadle) on Mar 27, 2005 at 00:47 UTC

    Boris

    That IS the output from the code.

    POST is the default method - so the fact that my code does not have it means nothing.

    If you re-read the my post you will see the ENCTYPE is the source of my confusion. Of course there should only be one. Of course, the default should be "application/x-www-form-urlencoded".

    Any other ideas ?

      Yes, use the encoding type explicit in your code. Since it looks, the default has changed.
      print $q->start_form( -enctype => "application/x-www-form-urlencoded", -action=>"myAction.pl");
      Boris

        Boris,

        as per the posted code ... tried & failed (both ways)

        -enctype => "application/x-www-form-urlencoded"

        and

        -enctype=>&CGI::URL_ENCODED