0

how to check form and auto redirect to paypal with post values? for example, if need to check if the user fill the Address filed and if its not empty i will redirect him to paypal checkout with the post values.

i need it in php, and BTW, can i use CURL?

Bonik
  • 792
  • 1
  • 7
  • 15

1 Answers1

1

here is an example.

http://www.html-form-guide.com/php-form/php-form-submit.html

here is another

http://www.daniweb.com/web-development/php/threads/296613

paypal, has an API for this don't they? all you have to do is use a form, and allow users, to submit the form to paypal url from the web page itself but hey...

update

once you are done with your stuff, you could just do the following,

<script type="text/javascript" language="javascript">
<!--
this.document.yourformtitle.send();
-->
</script>

you could just validate the form with ajax, on your site, once that has passed then redirect as shown above :) changing the action b4 hand :)

Val
  • 17,336
  • 23
  • 95
  • 144
  • no curl is not good, i need to redirect user to paypal after form check – Bonik Nov 08 '11 at 14:11
  • I think, you are asking for impossible here is another way http://stackoverflow.com/questions/463458/possible-to-post-data-in-a-php-redirect the answer tell you how to do it :) – Val Nov 08 '11 at 14:14