1. Home
  2. Computing & Technology
  3. PHP / MySQL
photo of Angela Bradley
Angela's PHP / MySQL Blog

By Angela Bradley, About.com Guide to PHP / MySQL

Changing CSS with PHP

Wednesday July 5, 2006
Different stylesheets can allow the same website to have different looks. Using PHP you can allow your users to choose between stylesheets so they can view their preferred version of the website. Their choice can be saved as a cookie, so it will stay the same each time they visit.
Comments
February 11, 2008 at 12:17 pm
(1) Sheila says:

Thanks for the switcher tutorial. I’ve been trying to do this for a couple days and this version works for me. However, when I load the page the style doesn’t show up. I have to click one of the links to get s styleheet to load.

Should I just link to the “normal” style sheet in the head?

April 20, 2009 at 7:35 am
(2) abdulaziz alshnaigat says:

thank you for this wonderful information angela

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL

©2009 About.com, a part of The New York Times Company.

All rights reserved.