Let's take a look at the example tutorial below.
First take a look at the submitted page:
<form action= "saveinfo.asp" method=post>
<!--Your Fields Here-->
<input type=submit value= "Submit" >
</FORM>
Here's a look at the page that receives the data and saves it.
<%
Set fs = CreateObject ("Scripting.FileSystemObject")
Folderpath=server.mappath ("") & "/cgi-bin/messages143718"
Wcounter=folderpath & "/counter.txt"
Set fs = CreateObject ("Scripting.FileSystemObject")
If Fs. FolderExists (FolderPath) Then
Set a = fs. OpenTextFile (Wcounter)
hits = CLNG (A.readline)
hits = hits + 1
A.close
Else
Set a = fs. CreateFolder (FolderPath)
Hits=1
End If
Set a = fs. CreateTextFile (Wcounter,true)
A.writeline (hits)
A.close
Set fs=nothing
Set fs = CreateObject ("Scripting.FileSystemObject")
Set a = fs. CreateTextFile (FolderPath & "" & Hits & ". txt")
for each x in Request.Form
a.writeline (X & ":" & Request.Form (x))
Next
a.close
Set a=nothing
Set fs=nothing
%>