jeddi
09-01-2009, 06:37 AM
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:
http://www.expert-world.com/sp/form.jpg
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 :confused:
Any one got any ideas on this ?
abduraooft
09-01-2009, 06:45 AM
You'd have got plenty of results if you googled it, see http://www.google.com/search?q=php+radio+button
cant you just use the paypal form maker?
jeddi
09-01-2009, 10:12 AM
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:
<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:
<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.
SKDevelopment
09-01-2009, 11:24 AM
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 (http://www.php.net/manual/en/ref.curl.php).
jeddi
09-01-2009, 09:30 PM
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.
funnymoney
09-02-2009, 02:57 AM
evaluating radio buttons is same as evaluating any other button.
you have it's $_POST['name'] like in any other form
yeah, post to a new page and set the variables for the paypal form in a redirect perhaps?
jeddi
09-02-2009, 05:46 AM
OK thanks for your input.
I think I will do the select form first and then on the next page do the
paypal button.