Page 1 of 1

form/table data refresh on time interval

Posted: Sun Oct 02, 2011 3:17 am
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

Re: form/table data refresh on time interval

Posted: Sun Oct 02, 2011 11:56 am
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)

Re: form/table data refresh on time interval

Posted: Mon Oct 03, 2011 3:36 am
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)

Re: form/table data refresh on time interval

Posted: Sun Oct 09, 2011 1:11 pm
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)