I'm wondering if you might have a php hack that does the same thing, but gets the cookie value for referrer ID, pulls the entire row of data from the DB for that referrer, and then allows echoing of referrer's name and referrer's ID in a way that would work even if used in a hidden form field, enclosed in quotes, like...
<input type="hidden" name="referrername" value="<?php print $fname; ?>">
I am looking for exactly the same thing.
Basically, I would like have some PHP code on my "landing page" to use the affiliate info to display customized pricing and information to the visitor, depending on the referring affiliate.
Can you tell me how to do this?
For example:
- Visitor hits my homepage, using affiliate link.
- Homepage "looks up" the affiliate ID in my database and retrieves custom pricing for my products
- Homepage is displayed, with custom pricing.
- Visitor makes purchase using custom pricing.
- Affiliate gets credit for 50% of the sale price.
Is that possible? It is the 2nd step that I need help with, as I don't know how to "get" the affiliate info in usable PHP variable. Perhaps there is a simple PHP script I can include on my page that will:
- Check for affiliate cookie
- If found, make available various jam variables such as "$jam_aff_id", "$jam_aff_name", etc..
- If not found, then my script would test to see that $jam_aff_id is empty.
Let me know...
Thanks!