title: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use nea
body: <p><strong>I get this error</strong>
  //ERROR</p>
  
  <blockquote>
    <p>ERRORINSERT INTO new_comp_reg (phno , fullname , address , dept , desc) VALUES ('','','','','')
        You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc) VALUES ('','','' ,'','')' at line 1</p>
  </blockquote>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>&lt;?php
  
      $servername = 'mysql.hostinger.in';
      $username = '';
      $password = '';
      $dbname = 'u424351292_icrcm';
  
      if(isset($_POST['submit']))
      {
          $phone_no = $_POST['phno'];
          $full_name = $_POST['fullname'];
          $location = $_POST['address'];
          $department = $_POST['dept'];
          $description = $_POST['desc'];
      }
  
          $conn = new mysqli($servername,$username,$password,$dbname);
  
          if($conn-&gt;connect_error)
          {
              die("Connection Failed" . $conn-&gt;connect_error);
          }
  
          $sql = "INSERT INTO new_comp_reg (phno , fullname , address , dept , desc)  VALUES ('$phone_no' , '$full_name' , '$location' , '$department' , '$description')";
  
          if($conn-&gt;query($sql) === TRUE)
          {
              echo "Complaint Registered";
          }
          else
          {
              echo "ERROR".$sql."&lt;br&gt;".$conn-&gt;error;
          }
  
      $conn-&gt;close();
      ?&gt;
  </code></pre>
  
  <p>//ERROR</p>
  
  <blockquote>
    <p>ERRORINSERT INTO new_comp_reg (phno , fullname , address , dept , desc) VALUES ('','','','','')
        You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc) VALUES ('','','' ,'','')' at line 1</p>
  </blockquote>