jck has asked for the wisdom of the Perl Monks concerning the following question:

print start_form({ -action => "$thisscript", -enctype => "application/x-www-form-urlencoded", -method => "post" });

is giving me this HTML result:

<form method="post" action="ti_login.pl" enctype="multipart/form-data" + enctype="application/x-www-form-urlencoded">

for the most part, i really like using CGI.pm, but i'm confused...please help me understand. TIA

Replies are listed 'Best First'.
Re: CGI form enctype values
by ikegami (Patriarch) on Jun 13, 2006 at 17:03 UTC

    It's related to

    If XHTML is activated (the default), then forms will be automatically created using [the multipart/form-data] encoding.

    Specifically, it doesn't ignore your -enctype => "application/x-www-form-urlencoded" as it should.

    Having CGI emit HTML instead of XHTML would allow you to use application/x-www-form-urlencoded. Make sure the MIME type returned by the web server matches the markup language you are using.