ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old April 2nd, 2005, 06:42 PM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 5
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?

Reply With Quote
  #2  
Old April 4th, 2005, 08:24 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,618 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 9 h 44 m 33 sec
Reputation Power: 53
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

Reply With Quote
  #3  
Old April 5th, 2005, 10:13 AM
Tyler7282 Tyler7282 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 50 Tyler7282 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 28 m 34 sec
Reputation Power: 4
I mailed you charmed0rz

Reply With Quote
  #4  
Old April 9th, 2005, 02:51 AM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 183 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 16 h 46 m 44 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Setting cookies in URL's..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway