Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MMMMmmm COOKIES 2

Status
Not open for further replies.

ChiefJoseph

Programmer
Feb 16, 2001
44
US
Hey this is a real studip problem but its driving me crazy! Heres the code,

<cfcookie name=&quot;test&quot; value=&quot;Accepts cookies&quot;>

Now in all of my documentation this should set(or write) the cookie in the clients computer. but its not working at all. I cant find any cookie by the name of test or cookie.test or whatever.

please help me

chiefjoseph
 
It's still not working.. I'm on a windows 2000 where should this cookie be stored? I'm running out of ideas, all of the documentation that i have says this should work.

ChiefJoseph
 
Paste this code into two seperate files (will work in one but lets make it site wide). Load index.cfm, and reload a few times to test that 0 still appears.

Then click GO, and reload a few times, should say strantheman over and over.

Try this:

<!--- app.cfm included site wide: --->
<CFIF NOT IsDefined('cookie.whoAmI')>
<CFCOOKIE name=&quot;whoAmI&quot; value=&quot;0&quot;>
</CFIF>

<CFIF cookie.whoAmI NEQ 0>
<CFSET xxx.whoAmI = &quot;strantheman&quot;>
<CFCOOKIE name=&quot;whoAmI&quot; value=&quot;#xxx.whoAmI#&quot;>
<CFELSE>
<CFSET xxx.whoAmI = 0>
<CFCOOKIE name=&quot;whoAmI&quot; value=&quot;0&quot; expires=&quot;NOW&quot;>
</CFIF>


<!--- index.cfm --->

<CFPARAM name=&quot;url.flag&quot; default=0>
<CFIF url.flag is 1>
<CFCOOKIE name=&quot;whoAmI&quot; value=&quot;strantheman&quot;>
</CFIF>

<CFOUTPUT>
#cookie.whoAmI#
</CFOUTPUT>
<br>
<a href=&quot;?flag=1&quot;>Go</a>

 
Yes!!

Thank you so much! I think windows 2000 stores cookie different then previous versions did. I got confused..

Also I changed my admin properties so the default var storage was cookie.

Thanks everyone for your help and thanks for the code stranthman!
chiefjoseph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top