Reply to Re: How can I show different style sheets according to user?

Your name:

Reply:


Posted by Balazs Wellisch on 12/30/05 03:00

You'd store their option of choice in a database table just like you'd store
the rest of their registration information. Then when they login you place a
conditional in the header of your pages that will decide which stylesheet to
load. Something like...
<?php

switch( $choice )
{
case 'style 1':
$stylesheet = '/path/to/style1.css';
break
case 'style 2':
$stylesheet = '/path/to/style2.css';
break
}

?>

<link href="<?php print $stylesheet ; ?>" rel="stylesheet" type="text/css">

Makes sense?

Balazs


"digit" <ddfdfs@ddd.org> wrote in message
news:AHZsf.8051$Wl3.7537@trndny04...
>I created a web site and want to see if it was possible to allow new users
>to choose between two skins at the time they register (maybe by a check
>box), can someone please explain if this is possible and maybe how I can do
>it using sessions?
> Thanks
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация