javascript - Dynamic CSS with SQL and PHP -
i have hit wall one, here scenario: user 1 clicks not available, div backgrounds gets set red , updates on elses screen.
css:
#user1 { background-color: green; <--the 1 need change. height: 40px; width: 40px; margin-left:-8px; margin-top:-8px; }
html:
<!doctype html> <html> <head><link href="css/html.css" rel="stylesheet"><meta http-equiv="refresh" content="5"></head> <body> <div id="user1"></div> </body> </html>
so question how can go reading css value sql database? can write fine, thats not problem, how update value read everyone.
thanks help.
you can use dynamic php-css file , use cache store temporary (so request count can saved)
create php file , set header content type text/css
header("content-type: text/css; charset: utf-8"); //your sql queries goes here
Comments
Post a Comment