By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,117 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,117 IT Pros & Developers. It's quick & easy.

Need to capture and save to db when paypal button clicked

P: 2
Hello,
I have standard Paypal "Add to Cart" buttons.
I don't have a shopping cart on my site I use
the Paypal shopping cart.

I'd like to track when a user clicks on the "Add to Cart"
and save that info to a database.

I'm proficient at ASP coding but not sure
how to handle this.

I was thinking about sending the paypal form fields to another
asp page when the user clicks the "add to cart" button,
updating the db, then create another form in code and submit
to paypal.

I don't know if it's possible to submit a form in
code on the server.

Any suggestions are appreciated!
Nov 6 '08 #1
Share this Question
Share on Google+
3 Replies


DrBunchman
Expert 100+
P: 979
Hi Mike,

It is possible to submit a form using javascript which you could fire in the OnLoad event of your html body tag after your asp code has updated the db. The javascript is:

Expand|Select|Wrap|Line Numbers
  1. FormName.submit();
You'd need to pass all of your variables on in the same way that you received them i.e. through the querystring or as hidden variables through the form.

Hope this helps,

Dr B
Nov 6 '08 #2

jhardman
Expert 2.5K+
P: 3,405
I was thinking paypal used querystring data, in which case it would be very easy to redirect from code.

Jared
Nov 7 '08 #3

DrBunchman
Expert 100+
P: 979
Yes, in that case after you've updated your db you could just use:

Expand|Select|Wrap|Line Numbers
  1. Response.Redirect "www.paypal.com?a=1&b=2" etc
Dr B
Nov 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.