Re: Cookie Newbie

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43518
interpreted = N
texte = 1) For local dev purposes, setting domain=(your IP address) will probably work.2) You do need to test a value, because [getcookie name=nonexistentcookie] will return blank. At a minumum, you can say [showif [url][getcookie name=Login][/url]!]- brianAt 8:12 AM 9/18/02, Dan Strong wrote: >Hi all, > >[discalimer] >Ok, I need to do something that I think should be pretty >simple...prob is I have never done it before and I am currently >pressed for time...have read/re-read the docs and am currently >looking through the archives, but additional real-time clarification >would be appreciated beyond comprehension. TIA. >[/disclaimer] > >After logging in succesfully, I want to set a simple session cookie >to the user's machine and then allow them access to certain pages >based on the existance of the cookie (And though it would be oh so >much easier, I cannot just use [protect...] [showif [username]=blah >blah...] because I do not admin my own server and would have to pass >along the login info to my admin each time a new user signs up...not >efficient...). So, as I understand it I would do something like this: > >After successful login: >[SETCOOKIE name=Login&value=TRUE&path=/&domain=www.mydomain.com] > >Then, on the pages requiring the cookie: >[GETCOOKIE name=Login] > >I do not fully understand the following even after mild testing: > >1) For dev purposes, the domain is /localhost/mydomain/, but on the >server, of course, it's www.mydomain.com. How do I set this to be >able to test locally?...&domain=localhost/mydomain/ > >2) Since I don't care what's in the cookie, only that it exists, is >the VALUE parameter useless? I mean if [GETCOOKIE name=Login] does >that mean it passes a value of TRUE back to the browser? Am I >splitting hairs? What *IF* C-A-T really spelled dog... > >I'm tired and confused, sorry. > >-Dan ------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Cookie Newbie (Bob Minor 2002)
  2. Re: Cookie Newbie (Rob Marquardt 2002)
  3. Re: Cookie Newbie (Inkblot Media 2002)
  4. Re: Cookie Newbie (Clint Davis 2002)
  5. Re: Cookie Newbie (Dan Strong 2002)
  6. Re: Cookie Newbie (Dan Strong 2002)
  7. Re: Cookie Newbie (Inkblot Media 2002)
  8. Re: Cookie Newbie (Dan Strong 2002)
  9. Re: Cookie Newbie (Dan Strong 2002)
  10. Re: Cookie Newbie (Dan Strong 2002)
  11. Re: Cookie Newbie (Brian Fries 2002)
  12. Re: Cookie Newbie (Gyorgy Ordody 2002)
  13. Re: Cookie Newbie (Inkblot Media 2002)
  14. Re: Cookie Newbie (ROBERT MCPEAK 2002)
  15. Cookie Newbie (Dan Strong 2002)
1) For local dev purposes, setting domain=(your IP address) will probably work.2) You do need to test a value, because [getcookie name=nonexistentcookie] will return blank. At a minumum, you can say [showif [url][getcookie name=Login][/url]!]- brianAt 8:12 AM 9/18/02, Dan Strong wrote: >Hi all, > >[discalimer] >Ok, I need to do something that I think should be pretty >simple...prob is I have never done it before and I am currently >pressed for time...have read/re-read the docs and am currently >looking through the archives, but additional real-time clarification >would be appreciated beyond comprehension. TIA. >[/disclaimer] > >After logging in succesfully, I want to set a simple session cookie >to the user's machine and then allow them access to certain pages >based on the existance of the cookie (And though it would be oh so >much easier, I cannot just use [protect...] [showif [username]=blah >blah...] because I do not admin my own server and would have to pass >along the login info to my admin each time a new user signs up...not >efficient...). So, as I understand it I would do something like this: > >After successful login: >[SETCOOKIE name=Login&value=TRUE&path=/&domain=www.mydomain.com] > >Then, on the pages requiring the cookie: >[GETCOOKIE name=Login] > >I do not fully understand the following even after mild testing: > >1) For dev purposes, the domain is /localhost/mydomain/, but on the >server, of course, it's www.mydomain.com. How do I set this to be >able to test locally?...&domain=localhost/mydomain/ > >2) Since I don't care what's in the cookie, only that it exists, is >the VALUE parameter useless? I mean if [GETCOOKIE name=Login] does >that mean it passes a value of TRUE back to the browser? Am I >splitting hairs? What *IF* C-A-T really spelled dog... > >I'm tired and confused, sorry. > >-Dan ------------------------------------------------------------- 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://search.smithmicro.com/ Brian Fries

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:

Using [detete] (1998) emailer (1997) BR (1997) Jimmy (1998) [WebDNA] An unknown error occured // Deadlock avoided (2011) Directory Overload (1998) Beta and new version questions? (1998) [ModDate] & [ModTime] ? (1997) Version 2.0 and 1.6 simultaneous (1997) multiple databases (1997) Firesite and [referrer] atg broke (1997) Friendly , quick 'security' check, please (2003) [WebDNA] WebDNA code validator (2011) RE: [WebDNA] Ubuntu and WebDNA (2019) VBScript and WebDNA (2003) More than one db with the same namn (was: WC2f3) (1997) Date field search needs ... (1998) WebCatalog for Postcards ? (1997) Admin Edit prob. (1997) searching for last file... WebCat solutions (1999)