<form action="" method="POST" id="name_form">
<input required name="text" placeholder="Name!" type="text">
<input value="Register!!" type="submit">
</form>
<span id="add_info"></span>
$("#name_form").submit(function(){
var str = $(this).serialize();
$.ajax({
type: "POST",
url: "func.php",
data: str,
success: function(html){
$("#add_info").html(html);
}
//return true;
});
return false;
});