title: PHP Session Variable In JavaScript
body: <p>How could I input php in this so when it has a correct password it stores the information as a cookie and then allow the deletion to it too.</p>
  
  <pre><code>  &lt;SCRIPT language="JavaScript"&gt;
      &lt;!--hide
  
      var password;
  
      var pass1="password";
  
      password=prompt('Please enter your password to view this page!',' ');
  
      if (password==pass1){
        alert('Password Correct! Click OK to enter!');}
      else
         {
          window.location="//Some Location//";
          }
  
      //--&gt;
      &lt;/SCRIPT&gt;
  </code></pre>