Jump to content

Referrer and Int Increase


ImJustBrndn

Recommended Posts

Ok, with the help of one of the moderators I've gotten most of the bugs worked out, except for two.

I want a confirmation.php page to be able to increase the "quantity" in table "products" by 1 everytime someone completes a paypal transaction, but I only want it to increase it by 1 if the person reaches the page from paypal.com I don't want someone to just be able to go to www.mydomain.com/confirmation.php and it increase the quantity without them paying. I only want it to increase it if the script says ok this person is being referred to this page from paypal, so that means they paid, so I can increase the quantity by one. Is there a way to do this in php, thanks for the help in advance.

Brandon
Link to comment
Share on other sites

How about something like:

if ($HTTP_REFERER == 'paypal.com/address') {
    //update db
}

I suppose if the referrer address is from paypal, but not always an exact string, you could use strpos() to determine if "paypal.com" is at least in the referring address.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.