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
$_GET
or$_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
echo
andjson_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
,text
etc to display the data.
Comments
no comments yet.