Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    60
    Thanks
    1
    Thanked 0 Times in 0 Posts

    insert into mysql on page load

    is it possible, I have a paypal thing I am working on, after you buy something it comes back to a page.

    can I insert into a database without pushing submit, would I need to populate a form and then auto send it?

    Thanks for your input

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,294
    Thanks
    57
    Thanked 523 Times in 510 Posts
    Blog Entries
    5
    Quote Originally Posted by dawg View Post
    is it possible, I have a paypal thing I am working on
    Yes it is possible that you have a paypal thing you're working on. Actually it's also possible that other programmers do to including paypal themselves

    Quote Originally Posted by dawg View Post
    after you buy something it comes back to a page.
    What comes back to a page? - the paypal lthing you might *possibly* be working on?

    Quote Originally Posted by dawg View Post
    can I insert into a database without pushing submit
    Generally we coders do that all the time .. we run a query This can be done anywhere in any script without the *need* to push any buttons. The only time you might want to use a button is with a form.

    Quote Originally Posted by dawg View Post
    would I need to populate a form and then auto send it?
    Depends on the project as to what you *need* to do but you can do that if you want yes!

    Quote Originally Posted by dawg View Post
    Thanks for your input
    No worries, have a nice day

    Now.. let me re-read your post again and see if it makes sense..

    Quote Originally Posted by dawg View Post
    is it possible, I have a paypal thing I am working on, after you buy something it comes back to a page.

    I have a paypal script I'm working on, when you buy something you go back to a page on my website.
    Ok

    Quote Originally Posted by dawg View Post
    can I insert into a database without pushing submit, would I need to populate a form and then auto send it?

    I have a form that I need to submit. Can this be sent automatically without the user clicking a button? - I need to put some details in the database
    Yes you can but it depends what it is. Naturally if you're hoping this automatic form contains their paypal login, credit card numbers and various other things, you're on a looser because you can't get those from paypal. Likewise you're not going to be able to auto submit a form to extract money from their paypal account either.

    What you can do however is send your own variables to your own site using an ajax request.

    Quote Originally Posted by dawg View Post
    Thanks for your input
    To be honest, there isn't much we can give you because you've not really described your situation very well, given us very little detail yet you seem to want an in depth guide as to how to do what you want done.

    My red comments were just guesses at what I think you meant..
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    Tpojka (11-10-2013)

  • #3
    New Coder
    Join Date
    Nov 2011
    Location
    Ratio, Logic
    Posts
    59
    Thanks
    3
    Thanked 6 Times in 6 Posts
    My assumption is next.
    OP need has a simple webstore and need to update his/her DB depending on paypal successful transaction. He could update it from form, but is not sure if buyer is solvent.
    His/her most biggest concern is how not to update DB on submit if buyer has no money to pay for product(s)/service(s).
    For that he should study xml, json, nv (pairs), curl, SOAP... to be able to use response variable from successful transaction in self owned script. That can be found on developer.paypal.com. It could be found on this link, but suggestion is to read documentation from start.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •