bu index.php olsun




<script></script>














<script>

$(function(){
$("input[type='submit']").click(function (){

var form = $("#form").serialize();
$.ajax({
type: "post",
url: "ajax.php",
data: form,
success: function(cevap){

$("div#yaz").html(cevap);

}

});

});});

</script>




buda ekle.php dosyan yani ajax.php





if($_POST){
$ad = mysql_real_escape_string(strip_tags(trim($_POST["ad"])));


echo $ad;

}



?>