title: PHP Cookies not being set in WAMP
body: <p>I have two scripts, one for processing a login and one for registering a login, they both create a sessiod id and insert it into both a cookie and a database. The DB insert works just fine, however, the cookies are not set:</p>
  
  <p>login:</p>
  
  <pre><code>//...Stuff...
  $sql = "SELECT * FROM dm_users WHERE username = '$username' LIMIT 1";
      $res = mysql_query($sql);
      if(mysql_num_rows($res) == 0) {
          header("Location: denied.php?u");
          die();
      }
      while($r = mysql_fetch_assoc($res)){
          $brought = $r['password'];
      }
      if (PassHash::check_password($brought, $password)) {  
          if($remember == 1) {
              $time = time() + (10 * 365 * 24 * 60 * 60);
          } else {
              $time = 0;
          }
          $val = uniqid() . time();
          setcookie("dmsesid",$val,$time);
          $sql = "INSERT INTO dm_sessions (username,sesid,`timestamp`) VALUES ('$username','$val',now())";
          $r = mysql_query($sql);
          $sql2 = "UPDATE dm_users set lastlogin = NOW() WHERE username = '$username'";
          $r2 = mysql_query($sql2);
          header('Location: ../characters.php');
      } else {  
          //...More stuff...
  </code></pre>
  
  <p>Register process works in much the same way, but only with the $time = 0; option.</p>
  
  <p>Any help would be greatly appreciated!</p>