title: MySQL , PHP : Hide specific Value from table
body: <p>I am working on a ' Show Online user' script where the script show everybody who is online.
  Now i want to remve the entry which matches the session user name i.e "if (Online user = Session User name ) then do not display it , just like on facebook.com chat where your friends id is shown and not your own Id 
  my code is as follows :</p>
  
  <pre><code>    &lt;?php
      mysql_connect("localhost","root","12345");
      mysql_select_db("accounts");
      $user = $_SESSION['user_name'];
      $result = mysql_query("SELECT * FROM online * WHERE ($chat&lt;&gt;$user)");
  
      while($row=mysql_fetch_array($result)) {
        $chat=$row["emp_name"];
        $chlk = ("&lt;a href=javascript:void(0) onclick=javascript:chatWith('$chat')&gt;$chat&lt;/a&gt;");
        $chs = ("&lt;a&gt;$chat&lt;/a&gt;");
        if ($chat &lt;&gt; $user) {
        echo $chlk;
        }
        else {
        echo $chs;
        }
     echo $chlk;
  }
  ?&gt;
  </code></pre>
  
  <p>I am getting the following error :</p>
  
  <p><code>Notice: Undefined variable: chat in localhost/accounts/removeuser.php on line 7</code></p>
  
  <pre><code>Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given localhost/accounts/removeuser.php on line 9
  </code></pre>
  
  <p>Any help is highly appreciated.</p>