I have set up a cookie in JavaScript to store the change to the stylesheet.

The cookie is loaded using

<body onload="set_style_from_cookie()">

This cookie was working fine until I set a session cookie in PHP to verity if a user was logged in

    $user = $_SESSION['username'];

This php code is placed at the top of the page. This has created a conflict with the JavaScript cookie. Is there anyway to get both cookies working together.

Cookies are the same for Javascript and PHP. There are no "PHP cookies" and no "Javascript cookies". Its all the same.

Just want to make sure you know that :)