| Q. How do I gather data from a form and send the output to a file ? A. You will need to do three things to set up the process to gather data from a form and write it to a file.
For example, if your account is masters, then your tree name is/home/yformusers/account-name/
/home/yformusers/masters To clear the datafile once you have downloaded the data, you need to sign onto the institutional web server (www.usna.edu) and perform the following commands: For example, if your account is masters, then your tree name iscd /home/yformusers/account-name/ cp /dev/null filename
cd /home/yformusers/masters cp /dev/null/database.txt |
<html>
<head>
<title>Test Request Form</title>
</head>
<body bgcolor="#FFFFFF" text="#000080">
<center>
<font size=4>Test Request Form</font>
</center>
<font size=3>
<FORM METHOD="POST" ACTION="http://www.usna.edu/cgi-bin/yform">
<INPUT TYPE="HIDDEN" NAME="sort" VALUE="order:name,department,email,phone">
<INPUT TYPE="HIDDEN" NAME="print_blank_fields" VALUE="1">
<INPUT TYPE="HIDDEN" NAME="recipient" VALUE="webmaster@usna.edu">
<INPUT TYPE="HIDDEN" NAME="return_link_url" VALUE="http://www.usna.edu/Masters/questions/quest-012.htm">
<INPUT TYPE="HIDDEN" NAME="return_link_title" VALUE="Masters FAQ">
<INPUT TYPE="HIDDEN" NAME="database" VALUE="/home/yformusers/masters/database.txt">
<INPUT TYPE="HIDDEN" NAME="delimiter" VALUE=",">
<INPUT TYPE="HIDDEN" NAME="required" VALUE="name,department,email,phone">
<INPUT TYPE="HIDDEN" NAME="sendcourtesy" VALUE="yes">
<INPUT TYPE="HIDDEN" NAME="courtext1" VALUE="Thank you for filling out the sample Survey">
<INPUT TYPE="HIDDEN" NAME="courtclose" VALUE="USNA Webmaster">
<INPUT TYPE="HIDDEN" NAME="resptext1" VALUE="Thank you for your
request.">
<PRE>
Name: <input type="text" size="45" name="name">
Department: <input type="text" size="35" name="department">
E-mail address: <INPUT TYPE="TEXT" SIZE="25" NAME="email"> (JohnPJones@nadn.navy.mil)
Phone number: <input type="text" size="10" name="phone">
</PRE>
<P><BR><P>
<CENTER>
<INPUT TYPE=submit VALUE="Send Survey"> or
<INPUT TYPE=reset VALUE="Clear Survey">
</CENTER>
<br>
<br>
</body>
</html>
2/28/2000,John Paul Jones,Leadership,JohnPJones@nadn.navy.mil,3-1111
2/28/2000,Oliver Hazard Perry,Pro Dev,Perry@nadn.navy.mil,3-2222
2/28/2000,Chester Nimitz,History,Nimitz@nadn.navy.mil,3-3333