how to check a php file every 10 second using javascript -



how to check a php file every 10 second using javascript -

i hava php file check items id

for illustration check.php:

<?php if(mysql_num_rows(mysql_query("select * items id = ".$_get['id']))) { echo "this id: $_get['id'] <b>true</b> \n\n"; } else { echo "this id: $_get['id'] <b>true</b> \n\n"; } ?>

every 10 seconds, want check ids using javascript.

<script> var id1 = 1; var id2 = 2; var id3 = 5; var id4 = 9; var id5 = 10; var id6 = 23; </script>

i don't know how utilize javascript or ajax.

i want output this:

//after 10 seconds id: 1 true //after 20 seconds id: 2 true //after 30 seconds id: 5 trud , ....

use setinterval interval , jquery $.load specifying variable arguments attached file load from... eg $('body').load('file.php?id=2&time=2');

javascript php load

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -