User Authentication
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 54517
interpreted = N
texte = Hi Folks...Can anyone help me debug this or let me know if I am going down the righttrack for creating a user authentication system. At the moment it justseems to be executing the final else statement.Thanks in advance...AlanP.S. Comments are heavy so you know what I am trying to do....[!] Description++++++++++++++++++++++++++++++++++++++++++++++++++++++++++The idea is that when the user logs in the following will take place:-1) Enter login details2) Check username is valid otherwise display error13) If the username is valid, check the password against it.4) If the username and password are valid then check which level of accessis allowed and redirect to content.5) Display error2 if the username and password do not match.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]Example of database format++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------userID userName password accessLevel-------------------------------------------------------1 alan freak 1++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]Variables being passed++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_userName // Username from login_password // Password from loginerror1 & 2 // Used to display the following messages on index page error1 : Username has not been recognised please re-enter error2 : There is a problem with your password please re-enter it++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]The Code++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][text]checkName=[lookupdb=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=userName][/text][if "[_userName]"="[checkName]"] [then] [text]checkPass=[lookupdb=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=password][/text] [if ("[_userName]"="[checkName]") & ("[_password]"="[checkPass]") [then] [lookup db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=accessLevel] [redirecturl=https://www.hanon-shop.com/press/press.html?accessLevel=[accessLevel]] [/then] [else] [redirecturl=https://www.hanon-shop.com/press/index.html?error=2] [/else] [/if] [redirect url=https://www.hanon-shop.com/press/press.html] [/then] [else] [redirect url=https://www.hanon-shop.com/press/index.html?error=1] [/else][/if]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Hi Folks...Can anyone help me debug this or let me know if I am going down the righttrack for creating a user authentication system. At the moment it justseems to be executing the final else statement.Thanks in advance...AlanP.S. Comments are heavy so you know what I am trying to do....[!] Description++++++++++++++++++++++++++++++++++++++++++++++++++++++++++The idea is that when the user logs in the following will take place:-1) Enter login details2) Check username is valid otherwise display error13) If the username is valid, check the password against it.4) If the username and password are valid then check which level of accessis allowed and redirect to content.5) Display error2 if the username and password do not match.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]Example of Database format++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------userID userName password accessLevel-------------------------------------------------------1 alan freak 1++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]Variables being passed++++++++++++++++++++++++++++++++++++++++++++++++++++++++++_userName // Username from login_password // Password from loginerror1 & 2 // Used to display the following messages on index page error1 : Username has not been recognised please re-enter error2 : There is a problem with your password please re-enter it++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][!]The Code++++++++++++++++++++++++++++++++++++++++++++++++++++++++++[/!][text]checkName=[lookupdb=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=userName][/text][if "[_userName]"="[checkName]"] [then] [text]checkPass=[lookupdb=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=password][/text] [if ("[_userName]"="[checkName]") & ("[_password]"="[checkPass]") [then] [lookup db=admin/users.db&value=[_userName]&lookinfield=userName&returnfield=accessLevel] [redirecturl=https://www.hanon-shop.com/press/press.html?accessLevel=[accessLevel]] [/then] [else] [redirecturl=https://www.hanon-shop.com/press/index.html?error=2] [/else] [/if] [redirect url=https://www.hanon-shop.com/press/press.html] [/then] [else] [redirect url=https://www.hanon-shop.com/press/index.html?error=1] [/else][/if]-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Alan White
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
ups quickcost [repost] (1999)
[protect admin] (1997)
email database file (2005)
Smart caching problems with 2.1b3? (1997)
Gil's in the lead (1999)
NetSplat and WebCat2 (1997)
Frames and WebCat (1997)
[WebDNA] WebDNA receiving numerous signal SIGSEGV then crashing (2016)
Missing contexts on NT (1997)
Web*3 virtual hosting Webcatalog problem + Vicom bonus (1998)
Stats (2004)
grep for search, not replace (2002)
Pithy questions on webcommerce & siteedit (1997)
Ampersand is breaking search context (1999)
WebCatalog can't find database (1997)
Kaaaaahhhhhhhnnnnnnn! (1997)
US Postal Service API (2007)
Tab Charactor (1997)
[WebDNA] Question about server performance ... (2008)
docs for WebCatalog2 (1997)