I have a PHP/MySQL application where I would like the background and text colors to change depending on who logs in. The colors would be stored with the users' records in a database.
How can I read these variables from within the CSS file?
Thanks
robzilla
9:46 pm on Dec 22, 2021 (gmt 0)
I would suggest using <style></style> and/or inline CSS to make those changes, rather than trying to dynamically insert the changes into the CSS file. The latter would require you to use a PHP script as your CSS file, or some variation of that, which is possible but computationally expensive compared to a static stylesheet file and probably unnecessary.