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

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

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?

Here are the form and the script:

-----------------------------------------

<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>

-----------------------------------------------

#!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";

Edited 2003-07-02 by Ovid