Take the 2-minute tour ×  I need to submit a form to put
username and password into my database, then i need to redirect
the user to a paypal button I have created.  I can only think to
redirect with the header() command but how can I POST variables
to the new page?  share|improve this question Have the form
submit to PayPal directly and in onsubmit for the form execute
ajax to your own server to record username/password. –  Aleks G
Aug 30 '12 at 12:04 You dont have to worry about that they will
be available using $name = $_POST['name'] –  raheel shan Aug 30
'12 at 12:08 add comment  2 Answers  You can't redirect to
PayPal with a POST, only a GET. However, you could do everything
via AJAX in javascript (such as the jQuery $.post function) so
that you first post to your PHP script and then in the result of
that post to PayPal. Here is a rough "sketch" of how this would
work:  var postData = {some_post_variable: "some value",
another_post_variable: "some other value"};
$.post('yourserver.com/yourscript.php', po