0

I check all documants about setinterval from forum but.. I couldnt find what I want... Here is my question.:

my code is below:

<?php
include('database_connection.php');
$sorgu = $baglanti->query("select * from makale");
while ($sonuc = $sorgu->fetch_assoc())  {
 ?>

MY TABLE CODE HERE.. ( codes like : <?php echo $sonuc['proje_ismi'] ?> )

<?php }  ?>

I call datas to my table from mysql.. But I change database from admin panel..

And What I want is when I change some data from adminpanel... My users will see it immediatly in few sec with setInterval code without refreshing page...

How can I do that in my documants?

1 Answer 1

1

The simplest thing you can do is to refresh the page automatically after few seconds:

<script>
// Auto-refresh the page after 5 seconds:
setTimeout(function() {
  document.location.reload(true);
}, 5000);
</script>
Sign up to request clarification or add additional context in comments.

1 Comment

Mr Armelin, can I also disable "refreshing" icon in web page every 5 sec? it will distrub users :S

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.