One way you can do this is to use PHP if and else statements such as.
PHP Code:
<? if(!$r) { // Do Nothing // } else { // What you want to do // } ?>
Using this you would then use links that look like this.
PHP Code:
http://www.mysite.com/?r=1
And if you want to take it to the next step you can use mod_rewrite to rewrite the link and make something like this.
PHP Code:
http://www.mysite.com/1
And then for storing the affiliate code you can use either sessions or cookies but personally I suggest that you use both just in case the user does not have cookies enabled.
Cheers!
Last edited by ryandanielt; 04-09-2009 at 03:32 PM..
|