The user's status text should be submitted to the server without reloading the page. To do this we can use the AJAX approach, where the user's data can be sent to the server with the HTTP methods, and wait for the server's response. As soon as the server responds, we can parse the response data and may take our decision programmatically. In our case, if the server responded with a success result, we will update our interface DOM according to that.
Simply, we will use AJAX to submit the user's status text with the
HTTP POST method to our server-side PHP code residing at
index.php, and we will configure the expected data type from the server to be JSON. So, we can easily parse the JSON and determine ...