Re: Cookie Newbie
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43527
interpreted = N
texte = That is actually a good suggestion.Thanks!----- Original Message -----From: Clint Davis
To: WebCatalog Talk Sent: Wednesday, September 18, 2002 10:49 AMSubject: Re: Cookie Newbie> Why couldn't you just set the cookie like this?>> [SETCOOKIE name=login&value=username> &expires=Tuesday, 18-Sep-2007 23:59:59 GMT> &path=/&domain=[GETMIMEHEADER HOST]]>> That way it adopts the correct domain for the machine it's currentlysitting> on...>>>> On 9/18/02 11:33 AM, Inkblot Media wrote:>> > Here is what I would do to make the code work on both areas without theneed> > to change after testing.> >> > In the win98 enviroment I would open the HOST file:> >> > (generally) C:\windows\system32\etc\drivers\hosts it maybe in thesystem> > folder. I cannot recall.> >> > In this file you will see an example:> >> > 127.0.0.1 localhost> >> > you can set a line so it looks like this> >> > 127.0.0.1 localhost> > 192.168.1.1 mydomain.com> >> > Replace the 192.168.1.1 with your IP address and also the mydomain.comto> > the actual domain you are working on.> >> > What this will do is cause your computer to look locally when you usethe> > URL without the www.> >> > http://mydomain.com> >> > and to the live site when you use the www.> >> > http://www.mydomain.com> >> > Now on to the cookie.> >> > You will need to check to see if the cookie exist.> >> > [GETCOOKIE name=cookieName]> >> > If the cookie exist you show page. If the cookie does not exist you callthe> > loggin script.> >> > [GETCOOKIE name=cookieName]> >> > [showif [GETCOOKIE name=cookieName]=]> > [include protect.inc]> > [/showif]> >> > After they do the loggin and you test against the username/password andall> > is ok you can set the cookie.> >> > [SETCOOKIE name=cookieName&value=OK&path=/&domain=mydomain.com]> > [SETCOOKIE name=cookieName&value=OK&path=/&domain=www.mydomain.com]> >> > By not setting the expiration date the cookie is a session cookie. Ialso> > set the cookie for both www and not, just incase.> >> > That should work, but a more simple way to do it (if you are passing the> > cart from page to page) is to set a header in the cart to the usernameor> > the persons name when logged in and check against it. This would alsolet> > you welcome them by calling that header.> >> > [orderfile cart=[cart]]> > [showif [header33]=]> > [include protect.inc]> > [/showif]> >> > [showif [header33]!]> > Your page goes here.> > [/showif]> >> > [/orderfile]> >> > I have a protect tag that does all the login stuff if you want it. Justlet> > me know.>> ---------------------------------------------------------------------> Clint Davis> Webmaster / Interactive Media Specialist> Gray Loon Marketing Group, Inc. http://www.grayloon.com> 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999> --------------------------------------------------------------------->>> -------------------------------------------------------------> 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/-------------------------------------------------------------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:
That is actually a good suggestion.Thanks!----- Original Message -----From: Clint Davis To: WebCatalog Talk Sent: Wednesday, September 18, 2002 10:49 AMSubject: Re: Cookie Newbie> Why couldn't you just set the cookie like this?>> [SETCOOKIE name=login&value=username> &expires=Tuesday, 18-Sep-2007 23:59:59 GMT> &path=/&domain=[GETMIMEHEADER HOST]]>> That way it adopts the correct domain for the machine it's currentlysitting> on...>>>> On 9/18/02 11:33 AM, Inkblot Media wrote:>> > Here is what I would do to make the code work on both areas without theneed> > to change after testing.> >> > In the win98 enviroment I would open the HOST file:> >> > (generally) C:\windows\system32\etc\drivers\hosts it maybe in thesystem> > folder. I cannot recall.> >> > In this file you will see an example:> >> > 127.0.0.1 localhost> >> > you can set a line so it looks like this> >> > 127.0.0.1 localhost> > 192.168.1.1 mydomain.com> >> > Replace the 192.168.1.1 with your IP address and also the mydomain.comto> > the actual domain you are working on.> >> > What this will do is cause your computer to look locally when you usethe> > URL without the www.> >> > http://mydomain.com> >> > and to the live site when you use the www.> >> > http://www.mydomain.com> >> > Now on to the cookie.> >> > You will need to check to see if the cookie exist.> >> > [GETCOOKIE name=cookieName]> >> > If the cookie exist you show page. If the cookie does not exist you callthe> > loggin script.> >> > [GETCOOKIE name=cookieName]> >> > [showif [GETCOOKIE name=cookieName]=]> > [include protect.inc]> > [/showif]> >> > After they do the loggin and you test against the username/password andall> > is ok you can set the cookie.> >> > [SETCOOKIE name=cookieName&value=OK&path=/&domain=mydomain.com]> > [SETCOOKIE name=cookieName&value=OK&path=/&domain=www.mydomain.com]> >> > By not setting the expiration date the cookie is a session cookie. Ialso> > set the cookie for both www and not, just incase.> >> > That should work, but a more simple way to do it (if you are passing the> > cart from page to page) is to set a header in the cart to the usernameor> > the persons name when logged in and check against it. This would alsolet> > you welcome them by calling that header.> >> > [orderfile cart=[cart]]> > [showif [header33]=]> > [include protect.inc]> > [/showif]> >> > [showif [header33]!]> > Your page goes here.> > [/showif]> >> > [/orderfile]> >> > I have a protect tag that does all the login stuff if you want it. Justlet> > me know.>> ---------------------------------------------------------------------> Clint Davis> Webmaster / Interactive Media Specialist> Gray Loon Marketing Group, Inc. http://www.grayloon.com> 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999> --------------------------------------------------------------------->>> -------------------------------------------------------------> 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/-------------------------------------------------------------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/
Inkblot Media
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:
%@#*& back button!!! (1999)
WebDNA-Talk Digest mode broken (1997)
textarea inputs and returns (1999)
[delete] problem (1997)
Re:Running 2 two WebCatalog.acgi's (1996)
404 error -- but wc code executes... (2001)
WebCat b13 CGI -shownext- (1997)
[WebDNA] SHA-512 How To Do It (2014)
WebCat2b12plugin - [search] is broken ... not! (1997)
[Cart] ... (1997)
[WriteFile] problems (1997)
Omnihttpd server on Win98 : Who knows how to configure it? (1999)
[WebDNA] PayPal integration code examples? (2011)
[WebDNA] WebDNA future (2010)
Simple way to create unique SKU (1997)
2.1b3 --> way slow (1997)
Country & Ship-to address & other fields ? (1997)
[WebDNA] Problem with SendMail - seems succesfull but nothing to (2016)
Introduction/Tutorial/QuickStart (1997)
SHOWIF/HIDEIF empty fields (2005)