You are here: Re: How can I show different style sheets according to user? « All PHP « IT news, forums, messages
Re: How can I show different style sheets according to user?

Posted by digit on 12/30/05 04:28

"Balazs Wellisch" <balazs@neusolutions.com> wrote in message
news:TE%sf.8334$hI1.4266@tornado.socal.rr.com...
> 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?

Can you please clarify for me, in your example 'style 1' and 'style 2' are
database columns and are what I named the check boxes on my registration
form? And $choice arghhh, I can't seem to find where to plug that one in on
the form!
Sorry for the very basic questions, I'm fairly new to PHP (obviously), but
tryin' :)

 

Navigation:

[Reply to this 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

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