p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_forms thread: How to save form submission to a file?


Message #1 by "Terence Wong" <coleterence@n...> on Mon, 25 Feb 2002 09:05:53
How do you save form submissions to a file and then retrieve the 

submission and submit it to the server?
Message #2 by Brent Latham <Brent2@w...> on Mon, 25 Feb 2002 09:42:18 -0000
How it works is this -



The User submits the form

The server recieves it

You initialise local variables with the submitted forms values

You create a filesystemobject and save the values to a text file

You then display the next page to the user!



The form is submitted to the server as soon as the client clicks

on the submit button.



If you going to reference the submitted forms values more than

once then you should use local variables to hold the values!



That probably hasn't given you the answer you were looking for

but its a start....and its still a little too early for anything

really creative!



Cheers

Brent  



-----Original Message-----

From: Terence Wong [mailto:coleterence@n...]

Sent: 25 February 2002 09:06

To: ASP Forms

Subject: [asp_forms] How to save form submission to a file?





How do you save form submissions to a file and then retrieve the 

submission and submit it to the server?




Message #3 by Nicky cung <leelee_110@y...> on Mon, 25 Feb 2002 02:30:39 -0800 (PST)
when u submit, if u wanna create a file, u must use

the FSO, here a simple tags 

Set ObjFSO 

server.CreateObject("Scripting.FileSystemObject")

Lastfile = "./DIRECTORY/"

set ObjGetFile=ObjFSO.GetFolder(server.MapPath

(Lastfile))

'LASTFILE that indicate where directory ur file will

be put

namefile="SAMPlE.TXT

Set objTextFile 

objFSO.CreateTextFile(Server.MapPath(Lastfile&namefile))

objTextFile.WriteLine "NAME : "&request.form("name")

objTextFile.WriteLine "BIRTH DATE : "

&request.form("birthdate")

objTextFile.WriteLine "SEX : " &request.form("sex")

objTextFile.Close



i think that will works.... 



--- Terence Wong <coleterence@n...> wrote:

> How do you save form submissions to a file and then

> retrieve the 

> submission and submit it to the server?





$subst('Email.Unsub').





__________________________________________________

Do You Yahoo!?

Yahoo! Sports - Coverage of the 2002 Olympic Games

http://sports.yahoo.com


  Return to Index