title: i am currently have an MYSQL syntax error
body: <p>i am very new at MYSQL and after i created this script to update a row in the table of a MYSQL Database and run it i get this error </p>
  
  <blockquote>
    <p>Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '265'', Employer_VAT_number = ''45698'', Employer_Name = ''Namtax_Ltd'', Employer' at line 3</p>
  </blockquote>
  
  <p>here is the code</p>
  
  <pre><code>// username and password sent from form 
      $Numb=$_POST["Numb"]; 
      $VAT=$_POST["VAT"];
      $Name=$_POST["Name"]; 
      $Addr=$_POST["Addr"]; 
      $PO=$_POST["PO"];  
  
      // To protect MySQL injection (more detail about MySQL injection )
      $Numb =  stripslashes($Numb);
      $VAT =   stripslashes($VAT) ;
      $Name = stripslashes($Name) ;
      $Addr =  stripslashes($Addr) ;
      $PO =   stripslashes($PO) ;
      $Numb = "'" . mysql_real_escape_string($Numb) . "'";
      $VAT = "'" . mysql_real_escape_string($VAT) .  "'";
      $Name =  "'" . mysql_real_escape_string($Name) .  "'";
      $Addr = "'" . mysql_real_escape_string($Addr) . "'";
      $PO = "'" . mysql_real_escape_string($PO) . "'";
  
      $sql=("UPDATE $tb1_name SET Employer_Registration_Number ='".$Numb."', Employer_VAT_number = '".$VAT."', Employer_Name = '".$Name."', Employer_Address = '".$Addr."', Employer_Postal_Address = '".$PO."' WHERE Employer_Name = '".$Name."' ");
  
      if (!mysqli_query($con,$sql))
        {
        die('Error: ' . mysqli_error($con));
        }
      echo "Successfully Updated";
  
      mysqli_close($con);
      ?&gt;
      &lt;/body&gt;
  </code></pre>