title: Keeping session/cookie separate in two folders
body: <p>I have two folders on my domain. <code>/builder</code> and /<code>viewer</code>. Each one functions independently from another, so when I set a cookie or session variable on one, I don't want it to affect the other.</p>
  
  <p>I tried to modify <code>session_set_cookie_params</code> to</p>
  
  <pre><code>session_set_cookie_params(0, "/viewer");
  </code></pre>
  
  <p>Then also changed <code>setcookie</code> to</p>
  
  <pre><code>setcookie(
    "$name",
    "$value",
    time() + ($days * 24 * 60 * 60),
    "/viewer"
  );
  </code></pre>
  
  <p>Now my viewer script doesn't seem to be able to read the cookies set. I figured I'm doing something wrong, I didn't think I needed to specify the domain parameter, but I must be missing something.</p>