This code works pretty well, place it inside an empty .cfm file:
<cfif isdefined("cookie.tmtCookieTest")>
<cflocation url="yescookie.htm" addtoken="No">
<cfelseif not isdefined("url.tmtCookieSend")>
<!--- First time the user visit the page, set the cookie --->
<cfcookie name="tmtCookieTest" value="Accepts cookies">
<!--- The cookie was send, redirect and set the tmtCookieSend flag as an
url variable --->
<cfheader name="Refresh" value="0; URL=#cgi.script_name#?tmtCookieSend=1">
<cfelseif isdefined("url.tmtCookieSend")>
<!--- We tried sending the cookie, no way, cookies are disabled, get out of
here --->
<cflocation url="nocookie.htm" addtoken="No">
</cfif>
----------------------------
Massimo Foti
[EMAIL PROTECTED]
http://www.massimocorner.com
Dreamweaver, Ultradev and Fireworks goodies
http://www.projectseven.com/viewer/snippets.htm
Snippets Panel
----------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists