I send a request to the server
<html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <form action="http://0.0.0.0:1234/qwerty" method="POST"> <input type="hidden" name="command" value="cmd"> <input type="text" name="fio"> <p><input type="text" name="usl"></p> <input type="submit" value="Отправить"> </form> <?php ?> </body> </html> After clicking on the "Send" button, the answer comes in the form of a json-string on a new page. Using php you need:
- Send a request so that when the answer comes (json-string) stay on the page with the form.
- Write the json string to a variable and parse; or parse immediately, if possible, in order to later output part of the data to the intended form field.
jQuery ajax. The variable will come back. - Artem GorlachevИ как записать эту json-строку в переменную, чтобы потом распарсить?. Explain in what language you want to parse the string? - Raz Galstyan