And finally, based on the success or failure, we take the appropriate action. Follow the examples below and choose the one that meets your needs better. Once we receive a response from the server, we parse it using the parse method of the JSON object. In this tutorial, we aim share with you 3 competent ways of sending post requests using PHP. If you want to receive application/json post data in your script you can not use POST. On the server side, I have WordPress, which obviously is backed up by PHP. In that event handler, we've initiated the AJAX call, which submits the form data to the login.php file using the POST method asynchronously. The name attribute on your input controls is what POST uses to index the data and therefore show the results. Recently I tried to use it by creating a POST request. PHP - A Simple HTML Form The example below displays a simple HTML form with two input fields and a submit button: Example Get your own PHP Server
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |