I have an online gateway which requires an HTML form to be submitted with hidden fields. I need to do this via a PHP script without any HTML forms (I have the data for the hidden fields in a DB)
To do this sending data via GET:
header('Location: http://www.provider.com/process.jsp?id=12345&name=John');
And to do this sending data via POST?
Another solution if you would like to avoid a curl call and have the browser redirect like normal and mimic a POST call:
save the post and do a temporary redirect:
Then always check for the session variable
post_data
:There will be some missing components such as the apache_request_headers() will not show a POST Content header, etc..
A workaround wich works perfectly :
In the source page,, start opening a session and assign as many values as you might want. Then do the relocation with "header" :
And then, in the targe page :
No need of Javascript nor JQuery.. Good luck !