Including results from a cookie.

PHP coding talk.

Moderator: Moderators

Including results from a cookie.

Postby paulg on Mon Apr 23, 2007 2:39 pm

Hi there,

I was wondering if someone could help me with this.

I've got a phpBB forum running on my site with a few customizations and one of the core php files has code in it that checks for a referrer ID from a cookie.

The code that checks for the cookie is as follows...

if (isset($_COOKIE['referredby'])... {
$referrer = $_COOKIE['referredby'];
}
else
$referrer = 'paul';

Could someone please tell me how I would use a similar piece of code that would let me display the referrer ID on the pages themselves? Just using something similar to the above, but with the referring ID printed on the page and if no referring ID then the "else" part should be displayed instead?

I do have eXtreme installed, but I don't know very much about php code unfortunately.

Many thanks,

Paul
paulg
Registered User
Registered User
 
Posts: 2
Joined: Mon Apr 23, 2007 2:35 pm

Postby paulg on Mon Apr 23, 2007 7:31 pm

Please don't worry about replying to this as I managed to figure it out myself :-)

Thanks,

Paul
paulg
Registered User
Registered User
 
Posts: 2
Joined: Mon Apr 23, 2007 2:35 pm


Return to PHP Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron