Re: [WebDNA] how to clear the [username] and [password] values the browser has stored?

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101124
interpreted = N
texte = Here is a system for logging into a mysql database you can do a lot more but this is just a down and dirty example, one thing to remember is that the cookie is not accessible on the page when its initially set so keep that in mind when using this setup. [!]If the cookie 'mem' is T Then skip the tests for user/pass and just go reset the cookie. otherwise test for if user/pass is blank[/!] [hideif T=[getcookie mem]][showif =[user]][redirect memlogin.tpl?t=1][/ showif] [showif =[pass]][redirect memlogin.tpl?t=2][/showif] [SQLConnect dbType = MySQL &host = myserver .cybermill .com &database=myuserss&uid=masterdbuser&pwd=masterdbpass&conn_var=conn1][/ SQLConnect] [SQLExecute conn_ref=conn1&result_var=rs1] select * from contact_info where password = '[pass]' and username='[user]'; [/SQLExecute] [SQLResult result_ref=rs1] [showif 1![numfound]] [!]If no user found then redirect to login page with error code[/!] [redirect memlogin.tpl?t=3] [/showif] [founditems] [!]Set some field variables for use[/!] [ListFields][text show=F]t_[fieldname]=[interpret][[fieldname]][/ interpret][/text][/listfields] [!]Set some cookies for this session UTC date is a function I keep in the globals folder for use by everyone. Mem is that the user has authenticated and MID is the id of the user for use later[/!] [SETCOOKIE name=MEM&value=T&expires=[include file=^includes/ UTCdate.inc&offset=35]&path=/&domain=.cybermill.com] [SETCOOKIE name=MID&value=[t_contact_id]&path=/&domain=.cybermill.com] [/founditems] [/SQLResult] [/hideif] [showif [getcookie mem]=T] [!]If the cookie is already set then lets reset the cookie so we can extend the users timeout UTC date is a function I keep in the globals folder for use by everyone. [/!] [SETCOOKIE name=MEM&value=T&expires=[include file=^includes/ UTCdate.inc&offset=35]&path=/&domain=.cybermill.com] [SQLConnect dbType = MySQL &host = www9 .cybermill .com &database=cybermill_support&uid=caballero&pwd=too2kool&conn_var=conn1] [/SQLConnect] [SQLExecute conn_ref=conn1&result_var=rs1] select * from contact_info where contact_id = '[getcookie MID]'; [/SQLExecute] [SQLResult result_ref=rs1] [founditems] [!]Set some field variables for use[/!] [ListFields][text show=F]t_[fieldname]=[interpret][[fieldname]][/ interpret][/text][/listfields] [/founditems] [/SQLResult] [/showif] On Oct 12, 2008, at 3:47 PM, Govinda wrote: > Could you give me an outline, in english/pseudo code? > And, could you elaborate on "session"? > This is not all new to me, but I stand to benefit from (fill out my > understanding from) your input. > > -G > On Oct 12, 2008, at 11:06 AM, Bob Minor wrote: > >> Thats is really why you don't want to use a realm. Instead when >> possible we use cookie/session based controls. >> >> On Oct 12, 2008, at 11:45 AM, Govinda wrote: >> >>> Happy sunday all! >>> >>> I am successfully using [authenticate], conditionals, and a custom >>> userGroups.db for protecting secure areas of our site. >>> What I am not clear about is how to use WebDNA to clear out the >>> values the browser has stored for [username] and [password]. >>> How do we do that? .... >>> > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Robert Minor Director of Internet Services ------------------------------------------------------------ Cybermill Communications http://www.cybermill.com http://www.merchantmaker.com Providing Ecommerce and interactive website development and hosting services on Macintosh, Windows NT, *nix, and AS/400. Complete ddos proof hosting solutions and network services. Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Govinda 2008)
  2. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Terry Wilson 2008)
  3. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Govinda 2008)
  4. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Bob Minor 2008)
  5. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Govinda 2008)
  6. Re: [WebDNA] how to clear the [username] and [password] values the browser has stored? (Bob Minor 2008)
  7. [WebDNA] how to clear the [username] and [password] values the browser has stored? (Govinda 2008)
Here is a system for logging into a mysql database you can do a lot more but this is just a down and dirty example, one thing to remember is that the cookie is not accessible on the page when its initially set so keep that in mind when using this setup. [!]If the cookie 'mem' is T Then skip the tests for user/pass and just go reset the cookie. otherwise test for if user/pass is blank[/!] [hideif T=[getcookie mem]][showif =[user]][redirect memlogin.tpl?t=1][/ showif] [showif =[pass]][redirect memlogin.tpl?t=2][/showif] [SQLConnect dbType = MySQL &host = myserver .cybermill .com &database=myuserss&uid=masterdbuser&pwd=masterdbpass&conn_var=conn1][/ SQLConnect] [SQLExecute conn_ref=conn1&result_var=rs1] select * from contact_info where password = '[pass]' and username='[user]'; [/SQLExecute] [SQLResult result_ref=rs1] [showif 1![numfound]] [!]If no user found then redirect to login page with error code[/!] [redirect memlogin.tpl?t=3] [/showif] [founditems] [!]Set some field variables for use[/!] [listfields][text show=F]t_[fieldname]=[interpret][[fieldname]][/ interpret][/text][/listfields] [!]Set some cookies for this session UTC date is a function I keep in the globals folder for use by everyone. Mem is that the user has authenticated and MID is the id of the user for use later[/!] [SETCOOKIE name=MEM&value=T&expires=[include file=^includes/ UTCdate.inc&offset=35]&path=/&domain=.cybermill.com] [SETCOOKIE name=MID&value=[t_contact_id]&path=/&domain=.cybermill.com] [/founditems] [/SQLResult] [/hideif] [showif [getcookie mem]=T] [!]If the cookie is already set then lets reset the cookie so we can extend the users timeout UTC date is a function I keep in the globals folder for use by everyone. [/!] [SETCOOKIE name=MEM&value=T&expires=[include file=^includes/ UTCdate.inc&offset=35]&path=/&domain=.cybermill.com] [SQLConnect dbType = MySQL &host = www9 .cybermill .com &database=cybermill_support&uid=caballero&pwd=too2kool&conn_var=conn1] [/SQLConnect] [SQLExecute conn_ref=conn1&result_var=rs1] select * from contact_info where contact_id = '[getcookie MID]'; [/SQLExecute] [SQLResult result_ref=rs1] [founditems] [!]Set some field variables for use[/!] [listfields][text show=F]t_[fieldname]=[interpret][[fieldname]][/ interpret][/text][/listfields] [/founditems] [/SQLResult] [/showif] On Oct 12, 2008, at 3:47 PM, Govinda wrote: > Could you give me an outline, in english/pseudo code? > And, could you elaborate on "session"? > This is not all new to me, but I stand to benefit from (fill out my > understanding from) your input. > > -G > On Oct 12, 2008, at 11:06 AM, Bob Minor wrote: > >> Thats is really why you don't want to use a realm. Instead when >> possible we use cookie/session based controls. >> >> On Oct 12, 2008, at 11:45 AM, Govinda wrote: >> >>> Happy sunday all! >>> >>> I am successfully using [authenticate], conditionals, and a custom >>> userGroups.db for protecting secure areas of our site. >>> What I am not clear about is how to use WebDNA to clear out the >>> values the browser has stored for [username] and [password]. >>> How do we do that? .... >>> > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > old archives: http://dev.webdna.us/TalkListArchive/ Robert Minor Director of Internet Services ------------------------------------------------------------ Cybermill Communications http://www.cybermill.com http://www.merchantmaker.com Providing Ecommerce and interactive website development and hosting services on Macintosh, Windows NT, *nix, and AS/400. Complete ddos proof hosting solutions and network services. Bob Minor

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:

pc (1997) WebDNA Solutions ... (1997) docs for WebCatalog2 (1997) SMSI -- a [notfound] context? (2002) 'RequiredField' Question (1998) possible, WebCat2.0 and checkboxes-restated (1997) WebDNA vs SQL ? (2002) This list needs a digest: rant, rave... (1997) Problems with [Applescript] (1997) New global preference ... ??? (2000) HideIf ip= OR ip= (1998) customizing the color of user's pages (1997) Re:[ShowIf] and empty fields (1997) Not seeing cart info on Invoice.tmpl (was PROBLEM) (1997) [Q] Novice's question (1997) back button problem (1999) why .HTML pages no processing? - More Info2 (2000) the dreaded unitShipCost (2003) WebDNA Solutions ... sorry! (1997) Newbie Help Needed (1998)