------veri ceken php-------
$takevsdown = $db->query("SELECT * FROM nexty ", PDO::FETCH_ASSOC);
foreach($takevsdown as $roj){
$h1 =($roj["hero1"]);
}
echo $h1;
?>
------veriyi yazan php-------
<script></script>
<script>
$(document).ready(function() {
gonder();
var int=self.setInterval("gonder()",2000);
});
function gonder(){
$.ajax({
type:'POST',
url:'nexty.php',
success: function (msg) {
$("#i1").val(msg);
//document.write(msg);
}
});
}
</script>