![]() |
small setcookie php question [pls help]
k coder is gone and I have to get this to work today and my skills are like zero :)
heres what I want: - landing page sets ccbill affiliate id - surfer goes to other page on same domain - surfer clicks straight www.bananabrandy.com url - aff id is set and aff gets credited heres what I got: http://www.dutchteencash.com/test/index.php?id=420671 <? $value = $id; setcookie("ccbill_referer", $value, time()+60*60*24*30); ?> AND http://www.dutchteencash.com/test/link.php <? echo $_COOKIE['ccbill_referer']; ?> ... ok now when I click the join form and check the aff isnt set :/ Pls help :) thanks!!! Bob |
maybe change:
$value = $id; to $value=$_GET['id']; ?? |
Quote:
no clue why its not workin :/ |
ok it does display sorry but the cookie for the aff isnt set
|
$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. |
Quick get a new coder
|
Quote:
I cant get it to work somehow, lemme hit you up thanks! |
ugh, don't you have to read the cookie :)
|
goodluck getting it to work :)
|
erm,
your coder has been missing for months now :) |
if you are still having issues, and want to toss a few bucks for someone to look into it, you can hit me up icq: 33375924
|
| All times are GMT -7. The time now is 08:57 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123