Re: Creating a text file from an HTML form

by Andrej Kostresevic <temporalassassin(at)yahoo.com>

 Date:  Wed, 13 Jun 2001 07:43:51 -0700 (PDT)
 To:  Susan Walsh <susan(at)equilibriumdesign.com>,
hwg-languages(at)hwg.org
 In-Reply-To:  equilibriumdesign
  todo: View Thread, Original
This should work. Haven't tested it, though:
<%
  Set Fso = Server.Createobject("Scripting.FileSystemObject")
  Set File = Fs.OpenTextFile("myFile.txt", 8, true)
  'the following loops through the form and writes the name and value 
  'of each element to the file
  for each item in request.form
    File.Write item & ":" & request.form(item)& ","
  next
  'the name and value pairs are colon(:) delimited. 
  'the elements are comma(,) delimited, as requested. This is very easy 
  'to change
  File.Close
  Set File = Nothing
  Set Fs = Nothing
    
%>
Hope it helps, =)
Andrej
--- Susan Walsh <susan(at)equilibriumdesign.com> wrote:
> Hi,
> 
> Does anyone know of a good tutorial on creating a comma delimited txt
> file
> from the contents of an HTML form?  I am using ASP, and I have the
> contents
> of a long form that I would like to email along with an attachment of a
> txt
> file that can be imported into other software.  I think this can be
> done...
> 
> Thanks in advance!!!
> 
> Susan Walsh
> 


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA