unknown1 Posted October 14, 2009 Share Posted October 14, 2009 Having an issue updating database before redirect to paypal. I'm not even 100% sure if what I'm doing is possible or if it's the correct way to go about it... I was hoping that someone who knows a little better could advise me on the best way to go about this. I have a form with one paypal buy now button, one subscription button and just a regular button. I'm trying to put conditions on the submission before the action is preformed. e.g. If users wants a featured listing they click the paypal buy now button and once clicked an update goes to the database before it's redirected to paypal. When I try this I just get redirected without update... no errors just seems like it's not reading the php before the redirect or something. Can anyone tell me how I would go about doing this? I looked into the IPN option but seems to be a lot of effort for just one buy now button and one subscription button. Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/177614-solved-mysql-update-before-redirect-to-paypal/ Share on other sites More sharing options...
JAY6390 Posted October 14, 2009 Share Posted October 14, 2009 use header('Location: http://www.paypal.com/URI_to_link_here'); after you insert into the db? Link to comment https://forums.phpfreaks.com/topic/177614-solved-mysql-update-before-redirect-to-paypal/#findComment-936477 Share on other sites More sharing options...
unknown1 Posted October 14, 2009 Author Share Posted October 14, 2009 use header('Location: http://www.paypal.com/URI_to_link_here'); after you insert into the db? Can you elaborate on that? I'm not 100% sure what your saying... so leave the action blank and in lieu add header redirect? Link to comment https://forums.phpfreaks.com/topic/177614-solved-mysql-update-before-redirect-to-paypal/#findComment-936482 Share on other sites More sharing options...
JAY6390 Posted October 14, 2009 Share Posted October 14, 2009 Your paypal button will have code of some kind that you will link to in it's href use that and replace the URL i put, then put that line after your insert query for your db Link to comment https://forums.phpfreaks.com/topic/177614-solved-mysql-update-before-redirect-to-paypal/#findComment-936483 Share on other sites More sharing options...
unknown1 Posted October 14, 2009 Author Share Posted October 14, 2009 Your paypal button will have code of some kind that you will link to in it's href use that and replace the URL i put, then put that line after your insert query for your db Thanks!! Link to comment https://forums.phpfreaks.com/topic/177614-solved-mysql-update-before-redirect-to-paypal/#findComment-936496 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.