form/table data refresh on time interval

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
abheesree
Forum Newbie
Posts: 3
Joined: Sun Oct 02, 2011 3:11 am

form/table data refresh on time interval

Post by abheesree »

Hi Friends
This is srikanth ,new to this group
I have a php page with 4 tables with different data ,
i need to refresh that data on different time intervals

how can do that
Help me
Thanks in Advance

Srikanth
User avatar
egg82
Forum Contributor
Posts: 156
Joined: Sat Oct 01, 2011 9:29 pm
Location: Colorado, USA

Re: form/table data refresh on time interval

Post by egg82 »

I came up with this same problem not too long ago. Here's what I did:

1. Put the mysql_query() and table output in a separate php file
2. add this to the end of the file (outside of the PHP code):
<form action="yourfile.php" method="post" id="redir">
</form>
<script language="JavaScript" type="text/javascript">
<!--
setTimeout("document.getElementById('redir').submit();", 5000); //refresh every 5 seconds. 5000 milliseconds = 5 seconds
//-->
</script>
3. iFrame or Frame that file in your index (or whichever file it was origionally in)
abheesree
Forum Newbie
Posts: 3
Joined: Sun Oct 02, 2011 3:11 am

Re: form/table data refresh on time interval

Post by abheesree »

Thanks for you reply
Let me try and come back

thanks again
egg82 wrote:I came up with this same problem not too long ago. Here's what I did:

1. Put the mysql_query() and table output in a separate php file
2. add this to the end of the file (outside of the PHP code):
<form action="yourfile.php" method="post" id="redir">
</form>
<script language="JavaScript" type="text/javascript">
<!--
setTimeout("document.getElementById('redir').submit();", 5000); //refresh every 5 seconds. 5000 milliseconds = 5 seconds
//-->
</script>
3. iFrame or Frame that file in your index (or whichever file it was origionally in)
abheesree
Forum Newbie
Posts: 3
Joined: Sun Oct 02, 2011 3:11 am

Re: form/table data refresh on time interval

Post by abheesree »

Thanks dude

worked ..

Thanks again :-)
egg82 wrote:I came up with this same problem not too long ago. Here's what I did:

1. Put the mysql_query() and table output in a separate php file
2. add this to the end of the file (outside of the PHP code):
<form action="yourfile.php" method="post" id="redir">
</form>
<script language="JavaScript" type="text/javascript">
<!--
setTimeout("document.getElementById('redir').submit();", 5000); //refresh every 5 seconds. 5000 milliseconds = 5 seconds
//-->
</script>
3. iFrame or Frame that file in your index (or whichever file it was origionally in)
Post Reply