You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by matt freake <ma...@hotmail.com> on 2002/05/22 12:38:42 UTC

Multipart form data inconsistincies

Hi,

Not sure if the cause of this is Embperl or CGI. If I have an ordinary 
bog-standard form on a web-page (post or get) and submit it, the resulting 
%fdat will *not* have entries for empty/unset input elements.

If I change the form to a multipart post form, the empty elements now appear 
in fdat (albeit undefined). If I change it to a multipart get form, the 
elements disappear from fdat again.

Try:

<html>
<head>
</head>
<body>
[+ do {use Data::Dumper; Dumper(\%fdat)} +]
<form method="post" action="">
<input name="test1"><br>
<input type="file" size="20" name="UPLOAD_FILE" accept="*.csv"><br>
<input type="submit" name="submit" value="Go!">
</form>
</body>
</html>

and change method from post to get.

Is there a reason for this/way round it ?

Thanks


Matt Freake


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Multipart form data inconsistincies

Posted by Gerald Richter - ecos gmbh <ri...@ecos.de>.
>
> Is there a reason for this/way round it ?
>

Just historical reasons. Set optAllFormData in EMBPERL_OPTIONS and you get
always all fields in %fdat.

BTW. 2.0 behaves always like optAllFormData is turned on

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org