title: How to generate a pop-up window if a user is not logged in?
body: <p>In an HTML page:</p>
  
  <pre><code>&lt;a href="/files/getfile.php?name=abc.zip"&gt;file download&lt;/a&gt;
  </code></pre>
  
  <p>in PHP script(getfile.php):</p>
  
  <pre><code>if('notlogged')
  {
    echo 'please, loggin~'; //pop up, possible?
    return false;
  }
  </code></pre>
  
  <p>So my question is, When user click the anchor tag, can I pop up a login window if user didn't log?</p>
  
  <p>I knew I can pre-check in Javascript before calling the PHP script whether user logged or not.</p>
  
  <p>But, it's not my case for use; the PHP script should have to throw pop up code.</p>
  
  <p>The page user is viewing should not changed — just pop up login window.</p>