|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Setting cookies in URL's..
Is there a way to set cookies in URL's? Right now, I am sending it the page, then setting it, then redirecting to the same page.. was wondering if there was a better way. This is how I am doing it currently.
<a href="test2.cfm?what=1">Page 1</a> <a href="test2.cfm?what=2">Page 2</a> <cfif StructKeyExists(url,"what")> <cfset session.what = url.what> <cflocation url="test2.cfm" addtoken="no"> <cfabort> </cfif> <cfif session.what is '1'> 1 </cfif> <cfif session.what is '2'> 2 </cfif> There has to be a more effecient way without the redirect, i hope? |
|
#2
|
|||
|
|||
|
I don't see a cookie being set anywhere in that code.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
I mailed you charmed0rz
|
|
#4
|
||||
|
||||
|
Code:
<CFIsDefined '#URL.Whatever#'> <CFSET COOKIE.Whatever = 'URL.Whatever'> </CFIF> Think this is where your going...You ask questions in a wierd way. Anyway hope this helps |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Setting cookies in URL's.. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|