AJAX requests and PHP responses
Thomas Mak wrote at 2017-04-20.
- JavaScript sends requests to PHP through internet.
- PHP handle the requests with parameters from
$_GETor$_POST. - PHP has the
$data, either from database or other data sources. - PHP includes essential external PHP files and functions to complete the logic.
- PHP sends processed data in JSON response via
echoandjson_encode. - Response is sent back to JavaScript through internet.
- JavaScript handles the data from PHP.
- JavaScript changes HTML DOM structure and content via
clone,append,textetc to display the data.
Comments
no comments yet.