title: calling php function to delete a record from database doesn't work
body: <p>can you please have a look at these codes and let me know why mysql query doesn't work?</p>
  
  <p>in a php file I add a check box to my page with following code</p>
  
  <pre><code>echo "&lt;input type=checkbox name=box[] onClick=\"deleteLink('$ClickedWord','$rLinks');\"'&gt;";
  </code></pre>
  
  <p>then in another php file "deleteLink" function exists and its code is:</p>
  
  <pre><code>function deleteLink($clword,$DltLinks)
  {
  
  &lt;?php
        session_start(); // start up your PHP session!
        $u= $_SESSION['Unit'];
        $f= $_SESSION['file'];
        mysql_query("DELETE FROM links WHERE ((Unit_Code='$u') &amp;&amp; (File_Name='$f')&amp;&amp; (Word='$clword')&amp;&amp; (Link_Add='$DltLinks'))") or die(mysql_error());
  ?&gt;
  }
  </code></pre>
  
  <p>I am sure that this file executes but doesn't delete the record. I did some tests to find the problem but no result!!!</p>