perlquestion
shifu
<p>My script process a html form, which post one parameter. But every time after I hit submit button, a window pops up asking for save/open/cancel. What's wrong?</p>
<p>Here are the form and the script:</p>
<p>-----------------------------------------</p>
<code>
<html>
<head>
<title>Fon</title>
</head>
<body>
<form method="post" action="cgi-bin/fon2.pl" >
<h2>Please enter phone</h2>
<p><input type="text" name="fon" /></p>
<p><input type="submit" name="submit" /></p>
</form>
</body>
</html>
</code>
<p>-----------------------------------------------</p>
<code>
#!c:\perl\bin\perl
print "Content type: text/html \n\n";
$input = <INPUT>;
@qsinfo = split (/\=/, $input);
$fon = @qsinfo [1];
open (OUT, ">fon.txt");
print OUT $fon, "\n";
close OUT;
print "Your fon has been entered";
</code>
<p><small>Edited 2003-07-02 by [Ovid]</small></p><!-- added code tags and tried to preserve intended formatting -->