rootKID Posted April 24, 2013 Share Posted April 24, 2013 hello, a quick question that might be obvoisly to me, but still needed to be answered due to my stupidness X)... is it possible to write php INTO a css file?.. like if/else statements with user sessions?.. coz i was thinking, im about to create a shoutbox for my panel, and was thinking if i somehow could get in the user table a row called like shout_background_color or something like that, with INT, then they would be able to choose like colors, background color, and so on by making if/else statements in there.. never tried it, but would like to ask here first if possible, and will it ruin the XHTML valid?... and yes, a rookie question, but even a rookie question can be wise.. lol, you get my point i suppose ... Link to comment Share on other sites More sharing options...
Ingolme Posted April 24, 2013 Share Posted April 24, 2013 It's possible, as long as you give the CSS file a .php extension. It won't affect the validity of your HTML. Link to comment Share on other sites More sharing options...
jack13580 Posted April 24, 2013 Share Posted April 24, 2013 or use a .htaccess to parse .css files with the php engine Link to comment Share on other sites More sharing options...
Krewe Posted April 26, 2013 Share Posted April 26, 2013 or use a .htaccess to parse .css files with the php engine OR just do what foxy said... give the css the php ending and give it a header that says it is css. Link to comment Share on other sites More sharing options...
rootKID Posted April 28, 2013 Author Share Posted April 28, 2013 sorry for late reply, as usual... but a header?, what?, you mean like a normal html document basicly where css goes into header?, i dont really follow that part hehe, but nice idea anyways! ... just that i was thinking to (try) and develop some sort of self-designing tool to my website.. if possible, so inside the css, it will get some sort of id from the database, where (example) the shoutbox_id has an extra row called shoutbox_css_bg_color or so, and then it will be int as always, and chose the css... just a long shot, but from what i hear you are saying, then it is possible, cool! x)... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now