Brainfart - someone got a match?

Results 1 to 2 of 2

Thread: Brainfart - someone got a match?

  1. #1
    Jeremy the great Guest

    Default Brainfart - someone got a match?

    I can&#039t think and I just need to verify with someone that this would actually work.<BR><BR>two pages.<BR><BR>page one collects variables from a form. Then sends them to the next page through another form.<BR><BR>request.form("field1") --[becomes]--&#062; &#060;input type="hidden" name="field1_form1" value="&#060;%=request.form("field1")%&#062;"&#062 ;<BR><BR>Page two collects info from first two forms then saves it to a text db.<BR><BR>Dim filesys, peoplefile<BR>Set filesys = CreateObject("Scripting.FileSystemObject")<BR>Set peoplefile = _<BR>filesys.OpenTextFile(_<BR>"c:inetpubwwwrootdo wnloaddownloads.txt",_<BR>8, true)<BR>peoplefile.WriteLine "User: " & request.form("field2")<BR>peoplefile.WriteLine "Pass: " & request.form("field1_form1")<BR>peoplefile.close

  2. #2
    Join Date
    Dec 1969

    Default Not since superman died...

    &#062; Page two collects info from first two forms then saves it to a text db.<BR><BR>Ummm...don&#039t you mean page THREE collects from the first two forms?<BR><BR>Sure, that will work, but wouldn&#039t it be better to create the file as a ".csv" file so you could use it later as a real DB if you decided to?<BR><BR>To do that, just change<BR><BR>peoplefile.WriteLine "User: " & request.form("field2")<BR>peoplefile.WriteLine "Pass: " & request.form("field1_form1")<BR><BR>to<BR><BR>peop lefile.WriteLine Chr(34) & request.form("field2") & Chr(34) _<BR>&nbsp; &nbsp; &nbsp; &nbsp; & "," & Chr(34) & request.form("field1_form1") & Chr(34)<BR><BR>See it? Enclose each field in quotes (unless it is numeric) and put a comma between pairs of fields.<BR><BR>If you write the first line of the file when you create it, putting in the names of the fields in order, then you have a .csv file that is ready to go. You can either use it directly with the MS "Text database" driver or you can import it into Excel or Access.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts