Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

html form

Status
Not open for further replies.

mrb009

IS-IT--Management
Mar 4, 2003
3
US
I have this html form I am working on, and the form is good except when you submit the form it sends it to my email, which I don't want. Does anyone know how to send the data from the form to a data file like notepad or word? Thanks


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body><form action="mailto:gberning@nk.k12.oh.us" method="post" enctype="text/plain">
<p align="center"><font size="6" face="Trebuchet MS, Arial, Courier New">Tech Repair Form</font></p>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="4" WIDTH="90%">
<TR>
<TD width="30%"><DIV align="right">
<B>Name:</B>
</DIV>
</TD>
<TD width="70%">
<INPUT type="text" name="name" size="30">
</TD>
</TR>
<TR>
<TD><DIV align="right">
<p><B>Date:</B></p>
</DIV>
</TD>
<TD>
<INPUT type="text" name="Date" size="10">
</TD>
</TR>
<TR>
<TD><div align="right">
<p><strong>Type of Problem:</strong></p>
</div></TD>
<TD>
<div align="left">
<INPUT type="text" name="Type of Problem" size="20">
(Example: Computer, Printer, etc...) </div></TD>
</TR>
<TR>
<TD><DIV align="right">
<B>Description of Problem:</B>
</DIV>
</TD>
<TD><TEXTAREA name="Description of Problem" cols="60" wrap="virtual" rows="4">
</TEXTAREA>
</TD></TR>
<TR>
<TD>&nbsp;</TD>
<TD>
<INPUT type="submit" name="submit" value="Submit">
<INPUT type="reset" name="reset" value="Reset">
</TD></TR>
</TABLE>
</FORM>


</DIV>
<BR>
</FORM>
</BODY>
</HTML>

</body>
</html>
 
Look into FileSystem Object to write files to folders. But, let me ask. What's the purpose of your form.

Are you trying to have uses access this form and you wanting to save these data?
 
I want to post this form on our website so my users can get to it and submit a problem and then I would like to have some access to the data so I can look over the data. Thanks
 
it depends entirely on what technology you want to parse the form - php / asp / jsp / cfm / perl.
Change the form statement: e.g.[tt]
<form action="log-problem.php" method="post" enctype="text/plain">
[/tt]or[tt]
<form action="/cgi-bin/log-problem.cgi" method="post" enctype="text/plain">[/tt]


You then to need to write code which parses the post-data and saves it to a database / appends it to a log file / other action. You could also script an email notification, which emails you when someone's completed the form. There is a pre-written perl script which does this trick: FormMail.pl.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
mrb009,

If you don't do programming yourself, you'll need a script that will take the form submission and save the results to a text file. This involves installing and modifying some variables in the script as well as the form. Here a few form processing scripts that also have the functionality of saving the data to a text file.

 
This article should give you a better understanding how HTML forms with server-side scripting work.

google.gif
juggle.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top