I have a script that processes a form, adds some stuff to a database, and I need it to then Redirect and Post that data to another site/page. I am able to post to the page using a sendToHost function, but I need the user to go to that page with the data as well. I'm pretty sure that you cant do this with the header function, and I cannot use the Get function because it is not allowed for this purpose. Is there any way to do this with Curl or something else. I have searched around all morning, and while I can find 50 ways to have php post the data to the page, I haven't found a way for the user to get redirected to that page and the Post variables go with them. Any help would be appreciated.
1. When ur server receive a post request it stores/process the post data 2. your server creates a page with a form which will have all post data as hidden variables 3. you can put any conviniencing message on a button page such as "Redirecting Please wait..." or "Continue.." etc. 4. the form has ACTION set to the second server 5. when user clicks the continue button it posts data to the second server 6. you may also use the onLoad() file submit i mean onLoad="formName.Submit()" ofcourse the 6th step requires javascript i hope this solves your problem
That will work, but I was trying to avoid using javascript. I dont think I have another option though.
Use a header Redirect with the values from the form passed as variables with the name of the form field. $url = "http://www.pasd.sda/skkk.php?var1=ans1&var2=an2....."; header("Location: ".$url); If you just do the DB processing, make sure you do not write anything to the page before the header() I.E. 1) Recieve Form 2) Do Database Action 3) Make form fields into URL string 4) Header Redirect Let me know if you need any further help Rgds, Chris
That would be using the GET method. I have tried it, but using GET is specifically denied for this purpose. Currently I'm using a javascript onload submit function and making non-javascript users click on an additional button.