View Single Post
Old 07-16-2006, 08:19 AM  
GFX Wiz
Confirmed User
 
Join Date: Jul 2004
Location: SW Florida
Posts: 916
$value = $_GET['id'] ;
if ( !isset( $value ) ) {
$value = $_COOKIE['CCBILL_REFERRER'];
if ( !isset( $value ) ) {
setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
}
} else {
setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
}

This will check for the existence of a referrer from the clicked link then double-check to see if there is already a referrer for this cookie name. If none of that exists it will set a new cookie.

Are you trying to pass the cookie from one domain to another? If you are you can't do that with plain old cookies...at least that's my understanding of cookies. But you can still accomplish that task using cookies and sessions and some creative thinking.
__________________
ICQ: 148.167.599
GFX Wiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote