title: Php sessions aren't working
body: <p>I am new to php, and very new to sessions, so I have no idea what I am doing wrong. I followed the tutorial on tizag, and put this code on my site:</p>
  
  <pre><code>&lt;?php
  
  session_start();
  
  echo SID . "&lt;br&gt;&lt;br&gt;";
  
  if(isset($_SESSION['views'])) {
      $_SESSION['views'] = $_SESSION['views'] + 1;
  } else {
      $_SESSION['views'] = 1;
      echo "views = ". $_SESSION['views']; 
  }
  
  ?&gt;
  </code></pre>
  
  <p>The SID changes whenever I refresh, and the number does not count up.</p>
  
  <p>Update: Url: <a href="http://121.73.150.105/PIA/" rel="nofollow">http://121.73.150.105/PIA/</a></p>
  
  <p>FIXED BY: Putting session_start() before my doctype, title etc.</p>