http://qs1969.pair.com?node_id=94563

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

OK, here's the situation: I have a perl script which basically takes the input of a form and dumps it to a file.

On my home machine, it works beautifully. Tested it on Apache.

On the server at work (Using IIS 4.0), it works pitifully. It records NO input from Netscape (all the variables are null) and in IE, all the data ends up in the same variable!

Here's the code.

#!C:/usr/bin/Perl use strict; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser set_message); my $log = 'Requests.log'; #All three of these are dif +ferent in the actual script, but that's not the problem my $errors = 'Errors.log'; my $techcontact = 'me@myaddress.com'; #You don't seriously expect me to document what these variable +s contain, do you? my $_name = param( 'name' ); my $_email = param( 'email' ); my $_institution = param( 'institution' ); my $_rank = param( 'rank' ); my $_address = param( 'address'); my $_telnum = param( 'telnum' ); my $_faxnum = param( 'faxnum' ); open LOG, ">> $log" or die " I can't open logfile for append +ing: $! Contact $techcontact at once!"; print LOG "Name: $_name -- Email: $_email -- Institution: $_in +stitution -- Rank: $_rank -- Telnum: $_telnum -- Faxnum: $_faxnum -- +Address: $_address \n"; close LOG; #OK, so here's the problem: In IE, EVERY SINGLE field appears in $_nam +e #In Netscape, these are all blank! Help! What can I do?! print header; print "<HTML>"; print "<HEAD>\n"; print "<TITLE>Registration Received</TITLE>\n"; print "</HEAD>\n"; print "<BODY>\n"; print "<P>&nbsp;</P>\n"; print "<CENTER><H3>Your form has been received successfully.</H3 +><br>\n"; print "Expect a confirmation email with payment instructions in +the next few days."; print "</CENTER><P><P>We received the following information: "; print "<BR>Name: $_name"; print "<BR>Email: $_email"; print "<BR>Institution: $_institution"; print "<BR>Rank: $_rank"; print "<BR>Telephone: $_telnum"; print "<BR>Fax: $_faxnum"; print "<BR>Address: $_address"; print '<P>If this is wrong, try submitting again. If it is still + wrong, send the correct info to rvandenh@stfx.ca'; print "</BODY>\n"; print "</HTML>\n"; #This block of code deals with when the user needs to be smacked w +ith a clue-by-four. BEGIN { sub handle_errors { my $msg = shift; print "<B><I>$msg</I></B>"; print "<P>Try filling out the form again."; } set_message(\&handle_errors); }