0

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

session_start();
if(isset($_SESSION['username']))
    {
    $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.

3
Contributors
3
Replies
20
Views
4 Years
Discussion Span
Last Post by riahc3
0

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 :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.