s1ay Posted August 3, 2007 Share Posted August 3, 2007 I have a PHP page that show's a picture but it only grab's the picture once. If I refresh it all the stats on the page will refresh but the picture stay's the same. I'm pretty sure the problem is in my php.ini and it is the php.ini-dist other than MySQL is enabled in it. Here are the two PHP pages I'm using. I'm a compleate PHP nub nub right now. I'm working on learning it but am focusing on getting C++ down first. Thanks S1ay PS. File was Ziped with WinRAR. At high compression. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/63230-image-refreshing/ Share on other sites More sharing options...
mcun Posted August 3, 2007 Share Posted August 3, 2007 You could do it with javascript. Let me give you an example. between the <head> and </head> tags of your site you place the following <script> function refreshimg() { document.getElementById('stats').src = "stats.jpg"; setTimeout("refreshimg();", 5000); } </script> then call the function refreshimg() somewhere in your script, and create the image as below. <img src = "stats.jpg" id = "refreshimg"> Sorry for it's not being PHP, but it might help you out Quote Link to comment https://forums.phpfreaks.com/topic/63230-image-refreshing/#findComment-315215 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.