Trying to wrap my head around this.
It seems like the usernames are working fine, but not the passwords.
I'm extracting data from a text file with the structure "username,password".
John,BOL12345
Mary2,BOL77777
Anna,BOL54321
test,BOL12345
The first 3 entries work perfectly on their own
But if I add the entry "test,BOL12345", suddenly the password BOL12345 works
Without that additional entry, none of the passwords seem to work.
This is all happening in JavaScript, let me show you some code below.
lines = x.responseText.split("\n");
for (i=0; i < lines.length; i++)
{
test1 = lines[i].split(",")
username.push(test1[0]);
password.push(test1[1]);
}
var tempUsername = document.getElementById('username').value;
var tempPassword = document.getElementById('password').value;
var arraycontainsusername = (username.indexOf(tempUsername) > -1);
var arraycontainspassword = (password.indexOf(tempPassword) > -1);
alert(password);
if (arraycontainsusername && arraycontainspassword) {
window.location.href = "listing.htm";
};