Refresh page when mysql value changes

I have a webpage which loads and displays variables (images and text) from 1 record in a sql table ‘pages’.

In another table ‘setting’ i have a record which holds which record must be shown.
When i update this value in the table ‘setting’ I want the webpage to load the new record from the ‘pages’ table

All i can find so far is to load new data into a container, but i want the webpage to reload and do a query so i can load all variables, which include lots of things that are not in a container, like css values

how can i do this?

I am no expert in this, but I suspect you’d need to have some kind of JavaScript on the client page to periodically query the setting table, and update the page when the value changes. More often I see how people want to change the page without reloading it, wouldn’t it be possible to just have your JS check, see the value has changed, then just do a page reload as part of the response handler?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.