Please note that I'm not very good with PHP, and I did browse the web to find my answer, and I was unable to find it, so I decided to ask it here!
I have two CSS files: black.css and white.css ; the default one is black.css, and I want to be able to change to the white and back if needed. This is my link to the stylesheet:
<link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" `href="<?php echo (!$sitestyle)?'black':$sitestyle ?>.css" />`
This is my HTML code: (Found in index.php)
<a href="switcher.php?set=white">
click here to change to WHITE style!</a>
This is my PHP code: (Found in switcher.php)
<?php
setcookie ('sitestyle', $set, time()+31536000, '/', 'mydomain.com/', '0');
header("Location: $HTTP_REFERER");
?>
When attempting to switch styles, it gives me an error saying 'The page isn't redirecting properly'.