ImJustBrndn Posted August 28, 2006 Share Posted August 28, 2006 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 Quote Link to comment Share on other sites More sharing options...
jvalarta Posted August 28, 2006 Share Posted August 28, 2006 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. Quote Link to comment Share on other sites More sharing options...
ImJustBrndn Posted August 28, 2006 Author Share Posted August 28, 2006 Thanks I wasn't for sure there was an action for that. Now as far as where it says //updated db is that actually a command or do I have to put my other stuff in there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.