Question regarding an array

Results 1 to 2 of 2

Thread: Question regarding an array

  1. #1
    Join Date
    Dec 1969

    Default Question regarding an array

    Well what I am trying to make is a function and when a user inputs their username and email it will dig through the text file database and return their password value <BR><BR>ex in txt file: <BR><BR>username pass email<BR><BR>heres what I have coded so far and it works cept when I put it will give me an error and I dont know why :S <BR><BR><BR>&#060;%<BR>option explicit<BR>function test()<BR> Dim objFS<BR> Dim strFileName<BR> Dim objFileRead<BR> Dim strText, NameStr<BR> Dim WordArray<BR> Dim formarray<BR><BR><BR> Set objFS = CreateObject("Scripting.FileSystemObject")<BR> strFileName = Server.MapPath("passwords.txt")<BR> Set objFileRead = objFS.OpenTextFile(strFileName,1,False )<BR> <BR> Do While Not objFileRead.AtEndOfStream<BR> strText = objFileRead.readline<BR> formarray = Request.Form("t")<BR> WordArray = Split(strText, " ")<BR> <BR> if WordArray(2) = formarray then<BR> response.write(WordArray(1))<BR> End if<BR> <BR> Loop<BR> objFileRead.close<BR> set objFileRead = nothing<BR><BR>end function <BR><BR>if Request.Form("dologin") = "yes" Then <BR>test()<BR>End if <BR><BR>%&#062;<BR><BR>please help sincerely buggs

  2. #2
    Join Date
    Dec 1969

    Default You don't give up, do you?

    WHAT ERROR? <BR><BR>On WHAT LINE?<BR><BR>And where is your DEBUG code?<BR><BR>At a minimum, you should be doing<BR> Response.Write "LINE: " & strText & "&#060;br/&#062;"<BR><BR>You still haven&#039;t told me why you name something <BR> formarray<BR>when it is in no way or shape an array.<BR><BR>WHY are you so reluctant to use a database???<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