EasyCFM.COM ColdFusion Forums / Bug Reports! / The Cookie Tutorial

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: The Cookie Tutorial

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

maquiladoras
05-16-2003 @ 12:11 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 2073
Joined: Dec 2002

Not so much a bug report
more of a query


<cfif IsDefined("cookie.password")>
   <!--- a cookie exist, so let's put in this password automatically into the form --->
    <cfset password = cookie.password>
<cfelse>
    <!--- a cookie DOES NOT exist, so let's put a blank value in the password field --->
   <cfset password = cookie.password>
</cfif>


Could you not just get rid of the cfif and just put

<cfset password = cookie.password> ????

----------------------------
"If you hear hoof beats, think
horsey, not zebra"
----------------------------

CJ
05-16-2003 @ 2:02 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4262
Joined: Oct 2002

actually...i *think* that should be:

<cfif IsDefined("cookie.password")>
   <!--- a cookie exist, so let's put in this password automatically into the form --->
    <cfset password = cookie.password>
<cfelse>
    <!--- a cookie DOES NOT exist, so let's put a blank value in the password field --->
   <cfset password = "">
</cfif>

not 100% sure about that, as it was not my tutorial...and I rarely use cookies.  but what i see in your post above doesn't seem to make much sense (as far as why there's even a conditional there...and how you can set the password to be cookie.password, if cookie.password does not exist (as in the second condition)).





CJ
@ #coldfusion/DALNet
http://charlie.griefer.com

Webmaster
05-16-2003 @ 3:07 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Administrator
Posts: 4542
Joined: Jan 2002

Ooopps! I thought I had changed it to that.. My bad! Smile

I hardly ever use cookies myself, but the tutorial was a requested one. I overlooked it, well I corrected it now! Smile

Thanks for pointing that out!

Thanks,
Pablo Varando

=====================================================


Website Designed and Developed by Pablo Varando.