title: How to know record has been updated successfully in php
body: <p><code>$sql = "UPDATE...."</code>;</p>
  
  <pre><code>if(mysql_query($sql))
      {
          $_SESSION['Trans']="COMMIT";
          header("location:result.php");
          exit;
      }
      else 
          {
              $_SESSION['Trans']="FAIL";
              $_SESSION['errors'] = "Error: Sorry! We are unable to update your Profile, Please contact to PNP HelpDesk.";
              header("location:result.php");
              exit;
          }//end  IF
  </code></pre>
  
  <p><strong>data is getting updated then why compiler is not coming inside IF condition.</strong></p>