What's the best way to...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
will83
Forum Commoner
Posts: 53
Joined: Thu Nov 10, 2005 3:13 pm

What's the best way to...

Post by will83 »

Hi there,

I have the lovely job of redisigning my company's website. One of the new functions will be to keep a record of a visitor's referring url along with any purchase they make.

At the moment I plan to grab the referring url and store it in the browsers session id and once they have made a purchase I can recall it and enter it in with the database along with their order.

Is the best way to do this??

Should I be using cookies instead (its an insurance website so it's not like I will need a shopping basket)

Any help will be appreciated,

Thanks

Will
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Referring page information is not always reliable. Just be aware.
User avatar
will83
Forum Commoner
Posts: 53
Joined: Thu Nov 10, 2005 3:13 pm

Post by will83 »

I have heard it before. Can you suggest a more robust method?

thanks
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

well if it's just for statistical use... who cares as long is it's usually reliable.
User avatar
will83
Forum Commoner
Posts: 53
Joined: Thu Nov 10, 2005 3:13 pm

Post by will83 »

It's for making sure agents get their commission if a client has come from a link on their site and makes a purchase.

When is using that methid not reliable? Does it depend on browers?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I agree. I wouldn't rely on it for really important stuff though.
Post Reply