Re: Onclick event and PHP function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pretty much the same technique I am using, tedd. I may have even used
your example as inspiration... :)

At the top of each page, I use

$currentstylecolor = isset( $_COOKIE['currentstyle'] ) ?
$_COOKIE['currentstyle'] : "brown";	//	brown = default style
$currentstyle = "/skins/style_" . $currentstylecolor . ".css" ;

then

<link rel="stylesheet" type="text/css" href="<?php echo $currentstyle ?>" >


Gerry

On 2/15/06, tedd <tedd@xxxxxxxxxxxx> wrote:
> >Alain, have you tried cookies?
> >
> >On http://www.lily-gallery.com/ you will see 2 colored dots (bottom
> >left) that allows for alternate page colors. Once a user chooses one,
> >I remember his choice with a cookie. I use the cookie to control a
> >style sheet.
> >
> >Gerry
>
>
> I didn't realize that he was wanting a clickie cookie thingie.
>
> Check out:
>
> http://www.sperling.com/examples/styleswitch/
>
> tedd
> --
> --------------------------------------------------------------------------------
> http://sperling.com/
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux