[FONT=Courier New]<!--WSS[/FONT]
[FONT=Courier New]define variable cLogin as character no-undo.[/FONT]
[FONT=Courier New]define variable cPassword as character no-undo.[/FONT]
[FONT=Courier New]define variable cMessage as character no-undo.[/FONT]
[FONT=Courier New]assign cLogin = get-value("loginName":U)[/FONT]
[FONT=Courier New] cPassword = get-value("password":U).[/FONT]
[FONT=Courier New]if cLogin ne "":U and cLogin ne ? then[/FONT]
[FONT=Courier New]do:[/FONT]
[FONT=Courier New] find <userTable> no-lock where [/FONT]
[FONT=Courier New] <userTable>.loginName eq cLogin [/FONT]
[FONT=Courier New] no-error.[/FONT]
[FONT=Courier New] if not available <userTable> [/FONT]
[FONT=Courier New] or (available <userTable> and <userTable>.password ne encode(cPassword)[/FONT]
[FONT=Courier New] then cMessage = "Invalid Login Name or Password. Please try again".[/FONT]
[FONT=Courier New] else ......[/FONT]
[FONT=Courier New]end.[/FONT]
[FONT=Courier New]-->[/FONT]