function send () {
$.ajax({
type: "POST",
url: "pasha.php",
data: "test=1",
success: function(data) {
if (data == 'success') {
alert("dsqweqwes");
}
}
})
}
<?php if($_POST['test'] == 1){ echo 'sea';}?>