From the newsgroup, Steve Ellis asked:
Does anyone have an example of how to do a logon that verifies a userid and password against a server database?
Nick L answered:
Yes,
Include the tables you need to validate against but use the web form to
memory and local Li/Pw variables.
I validate 2 tables, the "users"(AFF) and "user group(UGRP)".
In the embed "Validate Update" I do a lookup to the "Users" using the key
login and then the user group to compare with the local vars to pass the
login and password. I then lookup the group to get the group access level
then set some session variables as in the example below. Any suggestions to
streamline this would be appreciated, anyone??
!Get login credentials
If Loc:Login<>''
If upper(Loc:Login) = upper(AFF:Login) and upper(Loc:Password) =
upper(AFF:Password)
p_web.SetSessionValue('AffiliateID',clip(AFF:AffiliateID))
p_web.SetSessionValue('AFFLevel1',clip(UGRP:AccessLevel))
p_web.ValidateLogin()
!p_web.SetSessionLoggedIn(1)
Else
p_web.SetSessionValue('LoginMessage','Try again')
End !If
Else
p_web.SetSessionValue('LoginMessage','Login required, try
again')
End !If
****end example*****