title: Error in your SQL syntax; check the manual that corresponds to your MySQL server version
body: <p>HTML CODE</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;style&gt;
        #right
        {
        margin-top:109px;
        margin-right:225px;
        }
        #button
        {
        margin-right:;
        margin-top:22px;
        }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="total" style="width:1350px"&gt;
        &lt;div id="top" style="width:1350px;height:69px;background-image:url('top.png');float:;"&gt;&lt;/div&gt;
        &lt;div id="body" style="width:1350px;height:570px;background-image:url('body.jpg');float:;"&gt;
          &lt;div id="right" style="background-color:;height:283px;width:320px;float:right;"&gt;
            &lt;form action="new.php" method="post" &gt;
              &lt;input type="text" name="username" value="" size="37"  placeholder="username"style="height:20px"&gt;&lt;br&gt;&lt;br&gt;
              &lt;pre&gt;&lt;input type="password" name="password" value="" size="37" placeholder="password"style="height:20px"&gt; 
  &lt;div id="button"&gt;&lt;input type="image" name="" value="submit" src="button.png" /&gt;  &lt;input type="checkbox" value="check"&gt;&lt;br&gt;&lt;/pre&gt;
              &lt;/div&gt;
            &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div id="footer" style="width:1350px;height:33px;background-image:url('footer.png');clear:both;"&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>MY PHP CODE</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("localhost","prabha","prabha","prabha");
  // Check connection
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
  
  $sql="INSERT INTO table (username, password)
  VALUES
  ('$_POST[username]','$_POST[password]')";
  
  if (!mysqli_query($con,$sql))
    {
    die('Error: ' . mysqli_error($con));
    }
  echo "1 record added";
  
  mysqli_close($con);
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>When i clicked on submit button after entering username:prabha
  password:passwordofprabha</p>
  
  <p>It shows the following error. Please fix my code.</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 'table (username, password) VALUES ('prabha','passwordofprabha')'
    at line 1</p>
  </blockquote>