title: How to use a same cookie in jsp and php?
body: <p>I need to use cookie in php that has to created in jsp.</p>
  
  <p>I have tried like below.
  Jsp code for create a cookie:</p>
  
  <pre><code>Cookie userNamecookie = new Cookie ("username", snUser.getUsername());
  </code></pre>
  
  <p>PHP code for read cookie:</p>
  
  <pre><code>&lt;?php
  if (isset($_COOKIE["username"]))
    echo "Welcome " . $_COOKIE["username"] . "!&lt;br&gt;";
  else
    echo "Welcome guest!&lt;br&gt;";
  ?&gt;
  </code></pre>
  
  <p>But i am not able to read the cookie in php. Can any one please help me.</p>