refresh page to update table contents (from MySQL)

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

Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

nataly333 wrote:Of course have a .php extension file. One my computer is setup as a server, and second as a client. All another things are working well : connection to MySQL, tables filling...
Only refreshing doesn't work.
That's very odd. It supposed to work, but it doesn't:(
Is it depends on browser?
I remember that it worked. I reinstall php and MySQL, and it stoped to work.
But that is stupid: this is only html tag...?

Well we can always try the JavaScript way.

Put the following code anywhere in your webpage.......

Code: Select all

<script language="javascript">
function RefreshMe() &#123; window.location = '<? echo $_SERVER&#1111;"PHP_SELF"] ?>'; &#125;
setTimeout("RefreshMe()", 60000); // 1000 = 1 second.
</script>
........ that should work ........... hopefully.
nataly333
Forum Newbie
Posts: 17
Joined: Thu Oct 23, 2003 4:08 pm

Post by nataly333 »

Thanks to all for help.
Discussion was very interesting.
I found my mistake. It is work now.
Nice day to all !
Nataly
nataly333
Forum Newbie
Posts: 17
Joined: Thu Oct 23, 2003 4:08 pm

Post by nataly333 »

To Gen-ik
Thank You so much !
JavaScript is working and i like it more.
Have a nice day
Nataly
Post Reply