War Room

Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Featured Warrior Special Offer...
"Members Of The *War Room* Discover Secrets To Immediate Success!"
Reply
 
LinkBack Thread Tools
Old 08-08-2009, 02:45 PM   #1
DomainProfitsClub.com
War Room Member
 
Gene Pimentel's Avatar
 
Join Date: Feb 2007
Location: Oswego, NY USA
Posts: 1,264
Blog Entries: 1
Thanks: 254
Thanked 396 Times in 159 Posts
Default Displaying Cookie data

What is the best way to display specific cookie data on a web page?
For example, I want to display an affiliate's ID# that was stored as
a cookie. Here's a sample URL (not a real site):

http://thewebsiteexample.com/members/?member=1234

=======================================
The Cookie is stored with this data:
=======================================
Name: aff
Content: 1234
Domain: .thewebsiteexample.com
Path: /members/
Send for: Any type of connection
Expires: Wednesday, December 02, 2009, 8:01:19 AM
=======================================


On the web page, I simply want to display the '1234' or whatever
the affiliate number happens to be.

Thanks!

--------------------------------------------
DOMAIN PROFITS CLUB: Special discount for Warriors (just $5 gets you started!)
--------------------------------------------
Premium Domains For Sale: Blog Solution | LeadKey.com | KeyCruise.com | MyFreeOnlineCreditReport.com | PostcardMaster.com | SuccessJet.com | SweetMillions.com | TopRatedBooks.com | RoomWithView.com
Gene Pimentel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2009, 03:27 PM   #2
Active Warrior
War Room Member
 
Join Date: May 2007
Location: , , USA.
Posts: 84
Thanks: 2
Thanked 5 Times in 5 Posts
Default Re: Displaying Cookie data

In php use the cookie variable.

PHP Code:
echo $_COOKIE["aff"]; 

Dan Liptak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Dan Liptak For This Useful Post:
Old 08-08-2009, 04:11 PM   #3
DomainProfitsClub.com
War Room Member
 
Gene Pimentel's Avatar
 
Join Date: Feb 2007
Location: Oswego, NY USA
Posts: 1,264
Blog Entries: 1
Thanks: 254
Thanked 396 Times in 159 Posts
Default Re: Displaying Cookie data

Thanks! I'll try that.

--------------------------------------------
DOMAIN PROFITS CLUB: Special discount for Warriors (just $5 gets you started!)
--------------------------------------------
Premium Domains For Sale: Blog Solution | LeadKey.com | KeyCruise.com | MyFreeOnlineCreditReport.com | PostcardMaster.com | SuccessJet.com | SweetMillions.com | TopRatedBooks.com | RoomWithView.com
Gene Pimentel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2009, 08:40 PM   #4
DomainProfitsClub.com
War Room Member
 
Gene Pimentel's Avatar
 
Join Date: Feb 2007
Location: Oswego, NY USA
Posts: 1,264
Blog Entries: 1
Thanks: 254
Thanked 396 Times in 159 Posts
Default Re: Displaying Cookie data

That works, but ONLY if the web page is in the directory shown in the "path" mentioned in the cookie (in this case, "Path: /members/").

I want to be able to display the cookie data on a page that is not in the path mentioned. So even though the cookie was set at
http://thewebsiteexample.com/members/?member=1234

I'd like to include the cookie data on a page like...
http://thewebsiteexample.com/software/page1.php

Is there an easy solution?

Thanks!

--------------------------------------------
DOMAIN PROFITS CLUB: Special discount for Warriors (just $5 gets you started!)
--------------------------------------------
Premium Domains For Sale: Blog Solution | LeadKey.com | KeyCruise.com | MyFreeOnlineCreditReport.com | PostcardMaster.com | SuccessJet.com | SweetMillions.com | TopRatedBooks.com | RoomWithView.com
Gene Pimentel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2009, 09:26 PM   #5
Advanced Warrior
War Room Member
 
Steve Diamond's Avatar
 
Join Date: Apr 2006
Location: Tucson, AZ, USA.
Posts: 972
Thanks: 106
Thanked 143 Times in 103 Posts
Social Networking View Member's Twitter Profile 
Contact Info
Send a message via Skype™ to Steve Diamond
Default Re: Displaying Cookie data

Gene, I believe you have to make sure that when the cookie is stored it includes
Path: /
rather than
Path: /members/
That will mean it's active over the entire range of the domain.

HTH.

Steve

Executive I.T. consulting for small/medium business
Website development | PHP - MySQL - JavaScript expert programming
Software requirements analysis | Specification writing
Project management | Vendor relationship management
Steve Diamond is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Steve Diamond For This Useful Post:
Old 08-08-2009, 09:31 PM   #6
DomainProfitsClub.com
War Room Member
 
Gene Pimentel's Avatar
 
Join Date: Feb 2007
Location: Oswego, NY USA
Posts: 1,264
Blog Entries: 1
Thanks: 254
Thanked 396 Times in 159 Posts
Default Re: Displaying Cookie data

That makes sense Steve, but I don't have control over the way the cookie is created. It's part of a membership script. Thanks.

--------------------------------------------
DOMAIN PROFITS CLUB: Special discount for Warriors (just $5 gets you started!)
--------------------------------------------
Premium Domains For Sale: Blog Solution | LeadKey.com | KeyCruise.com | MyFreeOnlineCreditReport.com | PostcardMaster.com | SuccessJet.com | SweetMillions.com | TopRatedBooks.com | RoomWithView.com
Gene Pimentel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2009, 09:53 PM   #7
DomainProfitsClub.com
War Room Member
 
Gene Pimentel's Avatar
 
Join Date: Feb 2007
Location: Oswego, NY USA
Posts: 1,264
Blog Entries: 1
Thanks: 254
Thanked 396 Times in 159 Posts
Default Re: Displaying Cookie data

I've found a work-around, so no further info needed on this. Thanks for your help!

Gene

--------------------------------------------
DOMAIN PROFITS CLUB: Special discount for Warriors (just $5 gets you started!)
--------------------------------------------
Premium Domains For Sale: Blog Solution | LeadKey.com | KeyCruise.com | MyFreeOnlineCreditReport.com | PostcardMaster.com | SuccessJet.com | SweetMillions.com | TopRatedBooks.com | RoomWithView.com
Gene Pimentel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
cookie, data, displaying

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 07:22 PM.