Click to See Complete Forum and Search --> : Easy peasy newbie question


GreenGiant
07-27-2003, 09:50 AM
Firstly, the introduction...

Hi, I'm new to CGI, and cookies, but have a decent grasp of HTML and style sheets... my web host lets me use CGI with "safe Perl"... ie Perl but with anything that could possibly be malicious not allowed. SSI is allowed also.

Secondly, the problem...

All I want to do is to let the visitor decide what style he would want my website to be when (s)he views it. So that would be done by using the SSI include command to include a different style sheet, according to what the user chose. So my thinking is that they'd need to be some kind of CGI script to make this all work, Along with a cookie.

I picture there being a default style sheet to use if the user has no cookie, and there being a form where the user could choose what style (s)he would want to use.

Hopefully this message is vaugely understandable, help would be appriciated.

GreenGiant
07-29-2003, 03:47 PM
Why no answer? Is my question too hard? Too easy? Too stupid??

Please, any response would be nice...

pyro
07-29-2003, 03:51 PM
I did this in PHP for this site: http://www.webdevfaqs.com What I did was set a cookie with their preferences set, and then included the stylesheet based on the value of that cookie. Don't know much Perl (never used cookies in Perl before), so I can't give you exact code, but hopefully the explination of how to do it will get you started.