Re: HTML/CGI: how do i use POST

Hi fred,

	dont know why U use MAIL  ????
	to get around appending to a file.

	have You tried simply opening the file in append mode
	and writing your print lines to it ?
	seems like it is what U R trying to do, is it ?

	Please keep me posted.
	

thanks,
	frank naranjo
bi!
-------------------------


     Please help me understand what I'm doing wrong...
     When I click/press the submit key, my HTML file 
     displays my CGI file on the screen ...
     
     I want it to add to a file (fred.txt) and not display it results...
     
     thanks, fred
     
     
     **********this is fred.htm***************
     <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
     <HTML>...
     <form method="post" action="./fred.cgi">    
     ...
     <b>Please help us serve you better by completing the following </b>
     <p><Input Name="org"  Type=text size=25> Your Organization's Name 
     <p><Input Name="name" Type=text size=25> Your Name</n>
     <p><Input Name="tele" Type=text size=25> Your Telephone
     ...
     <input type=submit value="submit">
     ...
     </form>
     </HTML>
     
     
     **********this is fred.cgi***************
     #!/usr/bin/perl
     ....
     open ( MAIL, ">> fred.txt") || die print " cannot open mailprog";
     print MAIL "name=" $contents('name') \n;
     print MAIL "org= " $contents('org') \n;
     print MAIL "tele=" $contents('tele') \n;
     close(mail);
     
     print "<HTML><TITLE>Thanks!</TITLE><BODY>...\n";
     
     
     

Received on Friday, 13 December 1996 16:12:09 UTC