Re: HTML/CGI: how do i use POST

Frank Naranjo (naranjo@watson.ibm.com)
Fri, 13 Dec 96 16:10:53 -0500


Message-Id: <9612132110.AA19348@chickadee.watson.ibm.com>
To: Fred_Deroche_at_corpsoftnorwood4@stream.com
Cc: www-html@w3.org, frank@assetstech.com
Subject: Re: HTML/CGI: how do i use POST 
In-Reply-To: Your message of Fri, 13 Dec 96 15:18:56 -0500.
             <9611138505.AA850520263@smtpmail.stream.com> 
Date: Fri, 13 Dec 96 16:10:53 -0500
From: Frank Naranjo <naranjo@watson.ibm.com>


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