LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP/mySQL (https://www.linuxquestions.org/questions/programming-9/php-mysql-172312/)

BrettPower 04-19-2004 10:22 PM

PHP/mySQL
 
Does anybody know how to refresh php scripts individually? My intranet site has certain php scripts, all on the same page, that need to be refreshed every so often so the most current data can be viewed.

The workstations that the site will be on will not have the luxury of having a keyboard and mouse...they all have touch screens. I need the indivudual scripts to auto-refresh in a pre-determined amount of time.

The php scripts feed off of a mySQL database.

Thanks

j-ray 04-20-2004 02:06 AM

u may use a javascript refresh() function in your script. make a google search on that. u'll find code examples that refresh the display given an amount of time...
cheers

shubb 04-20-2004 01:34 PM

Try this

<?
header( 'refresh: 5; url=/url_to_refresh/' );
?>

cmfarley19 04-20-2004 02:35 PM

Or stick this in the page's HTML header:
Code:

<meta http-equiv="refresh" content="60;URL=url.php">

BrettPower 04-22-2004 03:02 PM

those methods do work, but some scripts need to update very frequently. If the screen flickers each time a refresh is done, it may give me a seizure.

There has to be a way to have some scripts on a page refresh, while others do not. individual is the key.

cmfarley19 04-22-2004 03:25 PM

First...
How namy scripts total?
How frequently does the fastest one need to refresh?

BrettPower 04-24-2004 07:28 AM

we are looking at roughly 15-20 scripts per papge at maximum, with, at the worst, a script needing an update from the database every second or less. I really need the option of having my scripts update at any interval I need. One script needs to be pretty much continuously updated.

cmfarley19 04-24-2004 09:30 AM

I'm not a real big fan of frames but you can try putting each script in it's own frame and use the
Code:

<meta http-equiv="refresh" content="60;URL=url.php">
method in each frame with each frame having a unique refresh rate. I do think the quickest that you can initiate a refresf is every second.


All times are GMT -5. The time now is 05:31 PM.