I have the following piece of code to get a value from the user which stylesheet to apply to the page.
session_start();
if (isset($_GET['css'])){
$_SESSION['css'] = $_GET['css'];
}
if (!isset($_SESSION['css'])){
$_SESSION['css'] = "3";
}
I then call the variable in the link tag:
<link href="['css']?>.css" rel="stylesheet" type="text/css" />
It works for the first page, but somehow the session variable seems to be killed when i browse around the page.
Does it have something to do with the session_start() method?
Thanks for any help...
session_start();
if (isset($_GET['css'])){
$_SESSION['css'] = $_GET['css'];
}
if (!isset($_SESSION['css'])){
$_SESSION['css'] = "3";
}
I then call the variable in the link tag:
<link href="['css']?>.css" rel="stylesheet" type="text/css" />
It works for the first page, but somehow the session variable seems to be killed when i browse around the page.
Does it have something to do with the session_start() method?
Thanks for any help...