Php frontend and backend transmission? How does the front-end transmit data to the backend? How does the background receive data from the front end? Use JSON_ENCODE ($? How does the background send data back to the front end?
$. Post ('', {'qnumber': qnumber}, function (data ){
}, 'Json ');? What does this mean?
Reply to discussion (solution)
$. Post indicates that you use post to send data.
The first parameter next to the backend processing page. use $ _ POST to retrieve your data.
{'Qnumber': qnumber} is obtained on the background page using $ _ POST ['qnumber '].
After the background page is processed, the json output is the page you want to return to the front-end
For example:
$ Return ['status'] = 1;
$ Return ['MSG '] = 'Operation successful ';
Echo json_encode ($ return );
How does the front-end transmit data to the backend? How does the background receive data from the front end? Use JSON_ENCODE ($? How does the background send data back to the front end?
$. Post ('', {'qnumber': qnumber}, function (data ){
}, 'Json ');? What does this mean?
How can I transmit the front-end qNumber to the backend? How to receive the background json_encode ($ );
How does the front-end transmit data to the backend?
The browser sends data to the background in the GET or POST mode, and the background receives data in the normal GET or POST mode.
How does the background send data back to the front end?
Of course, it was sent in the format required by the front-end. who told you to be a service provider?
$. Post ('', {'qnumber': qnumber}, function (data) {}, 'json ');
Notify jQuery to interpret the returned data as json
However, php cannot receive this notification. Therefore, php can only return data as agreed
Can I use an example?