title: how to display a message using php and cookies
body: <p>I need to display a message on my site using cookies.</p>
  
  <p>I tried to use this code : </p>
  
  <pre><code>&lt;?php 
  if (isset($_COOKIE['visit']) &amp;&amp; $_COOKIE['visit'] == "true"){
    echo 'cookie set, welcome back';
  } else {
    echo 'cookie not set, welcome new user';
    setcookie("visit", "true", time()+60*60*24*600);
  }
  ?&gt;
  </code></pre>
  
  <p>I don't known how to do it, please help!</p>