Ask a Question related to Macromedia ColdFusion, Design and Development.
-
casagrande8289 #1
cfcookie help
hello, i starting coding in coldfusion a week ago and i am really enjoying it
so far. However, i finally completed my hardest task yet by bulding a 1-10
ratign system for individual pages. That application works to perfection but
when i decided to implement cookies for one time use per user, i hit a road
block.
in the ratingscript file i made, after it inserts the vote and page into the
database, it sets a cookie named rated with a value of the previous page: (
<cfcookie name="rated" value="#CGI.HTTP_REFERER#" expires="never" />). This
worked fine for a while until i realized that once the person rates another
page, it changes the cookie so that he can go back and rate the other. I then
tried to set the cookie name to #CGI.HTTP_REFERER#, but then there was no way
to check the cookie without messed up variables (cfif
#COOKIE.#fullpagename##???????). Can someone please come up with an alternate
way of solving this problem and allowing a user to vote on multiple pages only
once?? It would be greatly appreciated
casagrande8289 Guest
-
cflogin and cfcookie in application.cfm - second postplease help
Hi, I just upgraded our CF5 to CFMX7 and having problem getting the cfcookied to work properly with the new cflogin tag in application.cfm. I... -
cflogin and cfcookie in application.cfm
Hi, I just upgraded our CF5 to CFMX7 and having problem getting the cfcookied to work properly with the new cflogin tag in application.cfm. I... -
CFCookie and Select
I am trying to set a CFCookie with the value from a List/Menu. I have the following code: <form name="form1" method="post" action=""> <p>... -
CFLOCK / CFCOOKIE and SubDomains with a _
This is a very odd problem.... We have a site that uses a wildcard subdomain, as many different agents use the same dynamic site. Whenever you... -
stpaz #2
Re: cfcookie help
You could save a simple list to the cookie of all the ID's that the user has
reviewed.
<cfparam name="cookie.rated" default="">
<cfcookie name="rated" value="#listappened(cookie.ratesd,ThisID)#"
expires="never" />
and then search the list to evaluate is they have rated the item
cfif isdefined("cookie.rated") AND ListFind(cookie.rated, ThisID)
--dont allow vote
cfelse
--allow vote
(thisID is the ID of the item beign voted on)
stpaz Guest



Reply With Quote

