awpeacock Posted January 9, 2007 Share Posted January 9, 2007 I need to be able to forward on POST variables programmatically in PHP, via POST again. The problem I have is thus:1. "John Smith" buys some stuff from website X. He goes through checkout, and on the last page of checkout specifies that he is from the UK (as this will affect postage costs).2. When Mr Smith clicks Submit, he is taken initially to PHP script myscript.php on website X that validates the data he entered on the previous form.3. On successful validation, myscript.php redirects to https://www.creditcardcompany.com/makepayment, retaining all the information previously posted through (e.g. name => John Smith, country => UK, etc.)This can be done via GET no problems -header("Location: https://www.creditcardcompany.com/makepayment?name=John+Smith&country=UK...").However, for obvious reasons (such as not wanting all variables to be plainly visible in the URL, and that the URL will be ridiculously large), I want to POST to the makepayment page. Is there a way to do that?There is the Javascript auto-submit option on the gateway page but, again, this is not preferable as I don't think my client would like their customers to see such a page.cURL and socket functions also aren't going to work because, obviously, punters want to see the nice padlock symbol and the letters "https" at the start of any URL when entering CC details.Somebody PLEASE, PLEASE tell me this is possible.Thanks Quote Link to comment Share on other sites More sharing options...
micah1701 Posted January 9, 2007 Share Posted January 9, 2007 what if you put them in a session array instead of post or get? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 9, 2007 Share Posted January 9, 2007 I second the session. POST can be manipulated just as easily as GET. Use the SESSION. Quote Link to comment Share on other sites More sharing options...
awpeacock Posted January 9, 2007 Author Share Posted January 9, 2007 Unfortunately, session isn't an option as the two scripts are on different servers. The whole need for the redirect is because the CC handling stuff is on a third party server, otherwise the script doing the validation could handle everything else too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.