根据会话数据更改样式表

Ok I have a session started within my application and it gets a session variable that defines a theme.

I have this code, but it doesn't seem to be working at all. Basically I want this to select the correct stylesheet based on the theme the user chose at registration. So if they selected the Default theme I would need the default css file to be linked and so on...

I am fairly new to PHP so if it's completely wrong, tell me but please help and tell me what's wrong. We all start somewhere.

<?php 
$themeName = '$_SESSION["SESS_THEME_NAME"]';
if ($themeName == "Default") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme.css" />';
}
if ($themeName == "Army") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-army.css" />';
}
if ($themeName == "Rocky Mountains") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-rocky.css" />';
}
if ($themeName == "Chinese Temple") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-chinese.css" />';
}
if ($themeName == "Boutique") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-boutique.css" />';
}
if ($themeName == "Toxic") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-toxic.css" />';
}
if ($themeName == "Aquamarine") {
    echo '<link rel="stylesheet" type="text/css" href="mws-theme-aquamarine.css" />';
}

?>

Remove the single quotes.. http://php.net/manual/en/language.variables.php

$themeName = $_SESSION["SESS_THEME_NAME"];

If that doesn't work, make sure that you have started the session http://php.net/manual/en/function.session-start.php

session_start()

make sure you start session on this page and edit the following,

$themeName = $_SESSION["SESS_THEME_NAME"];