title: How to show a server side error message in a popup using php
body: <p>I found some of the similar questions here but they are all in C#. </p>
  
  <p>So kindly tell me the easiest way to show the server side error message using popup.</p>
  
  <p>The popup may be anything like thickbox, modalpopup etc...</p>
  
  <p>Here is the sample code. I didn't get the error message in the popup.</p>
  
  <pre><code>&lt;script type="text/javascript" src="thickbox/jquery-latest.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="thickbox/thickbox.js"&gt;&lt;/script&gt;
  &lt;link href="thickbox/thickbox.css" rel="stylesheet" type="text/css" /&gt;
  
  
  
  &lt;span class="prtexterror" style="color:#FF0000;display:none;" id="hiddenModalContent" &gt;{$error_login}&lt;/span&gt;
  
  
  {literal}
  &lt;script language="javascript" type="text/javascript"&gt;
  
  
  
    $(document).ready(function() {
      tb_show("Please, login", "?tb_inline=true&amp;inlineId=hiddenModalContent&amp;height=180&amp;width=300&amp;modal=true", null);
  });
  
  
  
  &lt;/script&gt;
  {/literal}
  </code></pre>
  
  <p>Any other ways are always welcome. 
  thanks in advance</p>