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 9 of 9
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts

    How do I send this info with my form ?

    Hi,

    I want to alllow my clients to choose using
    a radio button selector and then click on the paypal
    button which sends in the form.

    This is what I have:



    The problem is that I don't know how to evaluate the
    radio button and give the correct price before the
    form is sent to paypal.

    Should I be doing this with javascript or can I accomplish this with
    PHP somehow. Seems that I need two forms one after the other
    but I can not see how to write it

    Any one got any ideas on this ?
    Last edited by jeddi; 09-01-2009 at 09:22 PM.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    You'd have got plenty of results if you googled it, see http://www.google.com/search?q=php+radio+button
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    cant you just use the paypal form maker?

  • #4
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Maybe I didn't make it clear.

    I know how to make a form with radio buttons.

    My problem is that to process that form
    you have something like:

    PHP Code:
    <form action="my_prog.php" method="post"
    And my prog will process the radio button.

    BUT.

    With the paypal button on the same page (see image)
    - I have to pass the processing over to paypal
    and the form starts up with:

    PHP Code:
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post"
    So my question is how do I get both done ?

    abduraooft - I am surprised at your comment, you usually give very helpful answers
    Shall we just scrap this forum then and google everything?

    If we do then where will the content be for this forum ?
    I followed your link and it doesn't help with my specific problem.

    This is not as easy as it seems.

    I need to find out the selection and assign price value and
    product name, then send the form to paypal.
    Last edited by jeddi; 09-01-2009 at 09:25 PM.

  • #5
    Regular Coder
    Join Date
    Mar 2006
    Posts
    238
    Thanks
    3
    Thanked 37 Times in 37 Posts
    I think you could submit your form to you local script and this script will send all the necessary data to PayPal using secure connection via e.g. cURL.

  • #6
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    I am not sure how to use that Curl.

    But paypal expect me to use a form,
    I just don't know how to evaluate these
    radio buttons before sending the form.

  • #7
    Regular Coder funnymoney's Avatar
    Join Date
    Aug 2007
    Posts
    364
    Thanks
    17
    Thanked 24 Times in 24 Posts
    evaluating radio buttons is same as evaluating any other button.
    you have it's $_POST['name'] like in any other form

  • #8
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    yeah, post to a new page and set the variables for the paypal form in a redirect perhaps?

  • #9
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    OK thanks for your input.

    I think I will do the select form first and then on the next page do the
    paypal button.


  •  

    Posting Permissions

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