O'Reilly logo

PHP Application Development with NetBeans Beginner's Guide by M A Hossain Tonu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hatching out the status poster using PHP-AJAX

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required