$(document).ready(function (){
$.post('register.php', {'name':$('#name').val(), 'phone' : $('#phone').val()},
function(data) {
$('#result').html(data);
});
});
echo $_POST['name'];
echo $_POST['phone'];