Quote:
|
Originally Posted by GFX Wiz
$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.
|
nope doesnt work sorry
I cant get it to work somehow, lemme hit you up
thanks!