[thelist] style switcher in php?

Geoff Sheridan web2k2 at premonition.co.uk
Fri Oct 25 16:26:00 CDT 2002


At 5:07 pm -0400 25/10/02, Merlene Paynter Blacha wrote:
>  I'm looking for a server side css style switcher in php. I saw one on
>alistapart.com but by the comments it sounds like it has some security
>issues. Does anyone on the list know of a switcher in php that can be
>cut and pasted easily. I'm just learning php and right now cut and paste
>is my best friend!
>
>Thanks in advance!
>Merlene

Hi Merlene

I wrote one - it's very simple but it may be helpful:

http://archivist.incutio.com/css-discuss/?id=8414

Yeah, and I *still* haven't got round to doing a webpage about it.
It doesn't suffer the security problems pointed out about the list
apart script - but then they were easily fixed. Mine avoids them by
hardwiring most of the path so:
/css/<?=$variable?>.css
The user-submitted $variable can only reference a file in /css and
only a file ending with .css

If anyone notes any security flaws in my very simple script, I'd be
glad to hear them.
Merlene - I'm not sure how 'copy and paste' it is, but let me know if
it gives you bother!

HTH

Geoff



More information about the thelist mailing list