$.ajax({
url: '../index.php',
type: 'POST',
data: {
'auth_code': auth_code,
},
success: function(response) {
alert('успех!')
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus);
}
});
if (isset($_POST['auth_code'])){
echo("Успех");
}