If it equals?

Trevor DeVore trevor at mangomultimedia.com
Thu Aug 22 11:59:00 EDT 2002

>One more thing I forgot to mention. I would like to include the Coded
>Password on the same line of the Name. How would I retrieve the password
>after the person has entered his name, and make sure it is the correct
>password? Thanks!

If you have two items per line then just set the itemDelimiter to whatever seperates them. Then we comparing the username and password you can say:

repeat i = 1 to the number of lines in myFile
  if loginname is equal to item 1 of line i of myFile then
    if password is equal to item 2 of line i of myFile then
      -- password is good
      exit repeat
      -- password is bad
    end if
    -- bad login name
  end if
end repeat

Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com

More information about the Use-livecode mailing list