krappleby025
Programmer
i have the following script.. which is supposed to check the value of the emailaddress against one that is entered on a form.. It is called by
emailaddress = request.form("emailaddress"
but this script is not generating the response needed, if the email matches then the duplicate field is supposed to read 1.. So that further scripts later can report the error.
Any ideas
dim myarray(8)
set fs = CreateObject("Scripting.FileSystemObject"
set txtfile = fs.OpenTextFile_("F:\Krapp\prize\prize.txt",1,0)
do while txtfile.AtEndOfStream = false
myArray(counter) = split(txtfile.ReadLine,","
if myArray(2) = emailaddress then
duplicate = "1"
end if
loop
txtfile.close
set txtfile = nothing
The file is set out in the following manner
name, email, town, choice1, choice2, choice3, choice4, choice5
thanks in advance
emailaddress = request.form("emailaddress"
but this script is not generating the response needed, if the email matches then the duplicate field is supposed to read 1.. So that further scripts later can report the error.
Any ideas
dim myarray(8)
set fs = CreateObject("Scripting.FileSystemObject"
set txtfile = fs.OpenTextFile_("F:\Krapp\prize\prize.txt",1,0)
do while txtfile.AtEndOfStream = false
myArray(counter) = split(txtfile.ReadLine,","
if myArray(2) = emailaddress then
duplicate = "1"
end if
loop
txtfile.close
set txtfile = nothing
The file is set out in the following manner
name, email, town, choice1, choice2, choice3, choice4, choice5
thanks in advance