The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

PHP is trying to kill me

bungo

New Member
affiliate
I'm trying to use PHP to allow the users of my website bungo.co.uk to choose a stylesheet, and as I don't know what I'm doing, I used an example script mezzoblue.com/zengarden/faq/switcher-php.txt]script from mezzoblue.com. The script to handle the stylesheets is working fine, and I've been using "pagetwo.php?cssfile=<?php echo $loadCSS; ?>" to link between pages once the style has been selected.

My problem is that once the user has selected a style and gone to another page, the stylesheet variable seems to expire. I've been testing this at piggah.net[/URL] if you want to take a look, I'm not too good at explaining things!

I was wondering if anyone knew a way to keep the stylesheet variable active for longer.

Oh, and just to be fussy, I'm really trying to avoid using Javascript and cookies, but if there's no other way around it then I guess they'll suffice.

Sorry if that didn't make sense, I'm completely new to PHP.
Thanks in advance,
Sam
 
Well if you don't use cookies and users are not registered and logged in to your site, I believe you won't be able to do it.
 
As the instruction you are issuing is a client side instruction, you really have no option. Although you could achieve it with a session ID (which is server side). The only problem with that is that the moment they leave your site the session ID will expire, and on their return they will get the default settings.
 
Hello Bungo

Have you considered a content management system that will have such functionality built in?

David
 
Yes, I've had a look at some of the major CMS' out there, but to be honest, my site is so small I just feel that using a CMS to sort out some minor issues would be like using a nuclear bomb to catch a minnow - a very time-consuming nucleat bomb at that!

Thanks for suggestion anyhoo.
 
the only gripe with using php is that for novices like me some programs can be incredibly easy to install and others are sooo much harder?

Shouldn't there be a standard installation procedure or something?!
 
Hi Bungo, if you're new to PHP you might want to take a look at a great FREE web host which provides great PHP cover - MySQL, PHP Mail_Function (), etc. pandela.com - try it out and you won't regret it. This is not a spam or something like this, I am a real person, using this hosting :) and I am really pleased with it. Check it if you are interested.
 
MI
Back