Daquan Posted December 21, 2008 Share Posted December 21, 2008 Hello, my name is Daquan Wright. I've been working with xhtml and css for a few years. About a year ago I got interested in PHP and I now have three books on the subject. I've done a few things with php and I've seen the power and dynamism it brings to the table of content. I know how to structure and style content, but I need a language to control behavior. Obviously JS is one choice, but PHP has always drawn me in so much more (of course I am aware of certain differences). I still have a lot to learn about it and I cannot yet create my own scripts, so here is my plead for anyone with time on their hands. My goal is to create a php script that will find out what browser a user is using. At that time, I would like for php to use if/else statements to inject a particular CSS file into being used for that page based on what client (browser) the user is using at the time. Basically I want a script that will determine what browser the user has and implement a particular stylesheet (since some browsers see things wrong or not the same). I'm sure this is possible but I just don't know where to start. I've got ideas but I was told by a programmer that it's risky to try creating code without a base to build from. Please, I wish learn to learn PHP very badly. Whether it be step by step or in one go, can someone show me how to make such a script? Note: I would like for it to search in particular for the browsers MSIE, FF, and Opera. Link to comment https://forums.phpfreaks.com/topic/137944-help-creating-a-style-switcher-script-i-want-to-switch-style-sheets/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.