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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

feedback form

Status
Not open for further replies.

carlosparedes

Programmer
Jun 10, 2007
12
GB
hi


I need to send details from feedback form to text file.

Feedbackform(example)

Code:
<body bgcolor="black"  text="#FFFFFF">
 
<form name="cart" method="Post" action="address.txt"  >  


<h3 align="center">Registration Form</H3><br><br><br>

Title: <select name="Title">
<option value="mister">Mr.</option>
<option value="mrs">Mrs.</option>
<option value="miz">Ms.</option>
<option value="miss">Miss</option>
</select><br><br>
 First Name: <input type="text" name="fname" size="50"/>

 Last Name: <input type="text" name="lname" size="50" />
</br></br>
Company: <input type="text" name="company" size="50"/><br/><br/>
Car Registration: <input type="text" name="CRegistration" size="50"/><br>Expected Date: <input type="text" name="date" size="40"/>
<br><br>
&nbsp;Always Expected: <input type="checkbox" name="Exp"/> <br/><br/><br><br>

<center><input type="reset" value="Reset" <input type="submit" value="Submit" />

    

  
</form>
</code>



address.txt

[Main]

Title: [Title]

Firstname: [fname].

Surname: [lname].

Company: [company].

CarReg: [CRegistration].

[Details]

ExpectedDate: [date].
AlwaysExpected: [Exp].

I want to write the CGI in ASP.
Could you help me.


Sandra
 
Sandra,

You still need to have your action page to be a asp page

<form name="cart" method="Post" action="address.asp">

and on the address.asp page have on the top

<%=response.contenttype="text/plain"%>

to put the data in the file...you can do request.form("myfield") and so on...

post back if you have any questions...

-DNG
 
The best way to do what you want is to use the File System Object (FSO). You will want to change the action attribute of your form to another page where you can use the FSO. See the link for more information on how to use it and, if you have more specific questions, post back.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top