(async () => {
let response = await fetch('json.php', {
method: 'POST',
headers: {"Content-type": "application/x-www-form-urlencoded; charset=UTF-8"},
body: 'id='+u.id+'&zag='+zag+'&tel='+u.tel+'&city='+u.city+'&categories='+u.categories+'&podkat='+u.sub_category
});
//let result = await response.text();
//alert(result);
})();
----------
hhhhh
'use strict';
kn1.onclick = async () => {
let response = await fetch('https://****.com/schot.php', {
method: 'POST',
});
let data = await response.text();
alert('---'+data);
};
-------------------------
'use strict';
kn1.onclick = async () => {
let response = await fetch('json.php', {
method: 'POST',
});
let data = await response.json();
alert(data.name3);
}
---------------------
$mysqli = new mysqli("localhost", "", "", "");
print json_encode($mysqli->query("SELECT * FROM test5 where id=2") -> fetch_assoc());