function inputXX() {
//
$(document).ready(function(){
var lastRowId = $('#num').val(); //finds id of the last row inside table
var name= new Array();
for ( var i = 1; i <= lastRowId; i++) {
name.push($("#name"+i).val());
}
var tname = JSON.stringify(name);
$.ajax({
url: "save_db.php",
type: "post",
data: {name: tname },
success : function(data){
$("#div1").html(data);
}
});
});
}