I tried to do this with cURL but it doesn't do any redirect to that specific page. It works fine if I post the form with hidden fields with the values set up. But anyone can see the posted data easilly by viewing View page source option in browser.n file.php, Then in your javascript, In the button click event, Get this form and set the values of input fields. Then submit the form, Then In the second site on which the user is redirected, if you want to get the data, do this, And here u go. You will have the data transferred from one site to other safely.