JF
echo "<script>
console.log('test');
var rs = window.confirm('Your confirmation message here');
if (rs) {
var xhr = new XMLHttpRequest();
var body = 'test=' + encodeURIComponent(rs.toString());
xhr.open(\"POST\", '/user/kabinet.php/', true);
xhr.setRequestHeader('Content-Type', 'text-plain');
xhr.onreadystatechange = function() {
// alert( this.responseText );
}
xhr.send(body);
}