Re: Cookie Newbie
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 43522
interpreted = N
texte = Here is what I would do to make the code work on both areas without the needto change after testing.In the win98 enviroment I would open the HOST file:(generally) C:\windows\system32\etc\drivers\hosts it maybe in the systemfolder. I cannot recall.In this file you will see an example:127.0.0.1 localhostyou can set a line so it looks like this127.0.0.1 localhost192.168.1.1 mydomain.comReplace the 192.168.1.1 with your IP address and also the mydomain.com tothe actual domain you are working on.What this will do is cause your computer to look locally when you use theURL without the www.http://mydomain.comand to the live site when you use the www.http://www.mydomain.comNow 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 call theloggin script.[GETCOOKIE name=cookieName][showif [GETCOOKIE name=cookieName]=] [include protect.inc][/showif]After they do the loggin and you test against the username/password and allis 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. I alsoset the cookie for both www and not, just incase.That should work, but a more simple way to do it (if you are passing thecart from page to page) is to set a header in the cart to the username orthe persons name when logged in and check against it. This would also letyou 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. Just letme know.------------------------------------------------------------Ronald Kirkland - PresidentInkblot Media - Internet Solutions ExpertsPhone: 949.400.4456 * FAX: 949.654.0269Visit: http://www.inkblotmedia.comEmail: ron@inkblotmedia.com----------------------------------------------------------------- Original Message -----From: Dan Strong
To: WebCatalog Talk Sent: Wednesday, September 18, 2002 8:41 AMSubject: Re: Cookie Newbie> Yeah, I thought that would actually be the case...so> something more like [SETCOOKIE name=[user]...] would be a> little more 'secure' ?>> >I guess the value doesn't matter altough you might want> >to put in something that kinda secures that it's _really_> >that guy who logged in...>> -------------------------------------------------------------> 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:
Here is what I would do to make the code work on both areas without the needto change after testing.In the win98 enviroment I would open the HOST file:(generally) C:\windows\system32\etc\drivers\hosts it maybe in the systemfolder. I cannot recall.In this file you will see an example:127.0.0.1 localhostyou can set a line so it looks like this127.0.0.1 localhost192.168.1.1 mydomain.comReplace the 192.168.1.1 with your IP address and also the mydomain.com tothe actual domain you are working on.What this will do is cause your computer to look locally when you use theURL without the www.http://mydomain.comand to the live site when you use the www.http://www.mydomain.comNow 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 call theloggin script.[GETCOOKIE name=cookieName][showif [GETCOOKIE name=cookieName]=] [include protect.inc][/showif]After they do the loggin and you test against the username/password and allis 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. I alsoset the cookie for both www and not, just incase.That should work, but a more simple way to do it (if you are passing thecart from page to page) is to set a header in the cart to the username orthe persons name when logged in and check against it. This would also letyou 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. Just letme know.------------------------------------------------------------Ronald Kirkland - PresidentInkblot Media - Internet Solutions ExpertsPhone: 949.400.4456 * FAX: 949.654.0269Visit: http://www.inkblotmedia.comEmail: ron@inkblotmedia.com----------------------------------------------------------------- Original Message -----From: Dan Strong To: WebCatalog Talk Sent: Wednesday, September 18, 2002 8:41 AMSubject: Re: Cookie Newbie> Yeah, I thought that would actually be the case...so> something more like [SETCOOKIE name=[user]...] would be a> little more 'secure' ?>> >I guess the value doesn't matter altough you might want> >to put in something that kinda secures that it's _really_> >that guy who logged in...>> -------------------------------------------------------------> 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:
Re:2nd WebCatalog2 Feature Request (1996)
WebCat Hosting - Pricing Question (2002)
WebDNA on Linux (2005)
WebCat and image maps (1997)
Clear/Reset form with JavaScript (2001)
Email Formatting and Encryption (1998)
referrer variable (1997)
[ShowNext] feature in 2.0 (1997)
View order not right (1997)
Installing Web DNA 5.1 on a MAC (2004)
chat opinion ... (2002)
Lambada for Macintosh is Here! (1996)
automating txt downloads for conversion to webcat db (2006)
Problems with [Search] param - Mac Plugin b15 (1997)
WCS Newbie question (1997)
Complex replace Q-not for the timid!! (2000)
Quickie question on the email templates (1997)
mySQL numfound (2006)
UPS tracking number (2003)
find with exceptions (1997)