Re: How to make a pot request in php
Hi,
POST requests are server variables, which can only get created when a form is submitted and I don’t think there is any way of creating a post request without submitting a form. If you have to send a request to some other server which uses API then you can use CURL to do this otherwise if it has to be on the same server then the only way is by submitting a form. Now if you do not want to show a form on the webpage what you can create a form with all hidden fields and use the JavaScript to submit this form, you can call the JavaScript to submit this form on onload event of the body or on any click.
Hope this makes sense.
Cheers,
|