title: Error: Unknown column '' in 'field list' MySQL error
body: <p>I am unable to insert data. The error is:  </p>
  
  <blockquote>
    <p>Error: Unknown column '' in 'field list'</p>
  </blockquote>
  
  <p>It is simpy an HTML form page and data is taken by the user to insert in a database dB.
  Help is truly required. I am unable to get the error things. I am a newbie.</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("localhost", "root", "root","dB");
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
  
  $enrollno=$_POST['enrollno'];
  $fname=$_POST['fname'];
  $lname=$_POST['lname'];
  $fathername=$_POST['fathername'];
  $coursename=$_POST['coursename'];
  $yearsem=$_POST['yearsem'];
  $facultyno=$_POST['facultyno'];
  $hostel=$_POST['hostel'];
  $roomno=$_POST['roomno'];
  $email=$_POST['email'];
  $mobileno=$_POST['mobileno'];
  $peradd=$_POST['peradd'];
  $district=$_POST['district'];
  $state=$_POST['state'];
  $amount=$_POST['amount'];
  $pwd=$_POST['pwd'];
  $tnc=$_POST['tnc'];
  
  $sql="INSERT INTO registration (enrollno, fname, lname, fathername, coursename, yearsem, facultyno, hostel, roomno, email, mobileno, peradd, district, state, amount, pwd, tnc) VALUES ('$enrollno',`$fname`,`$lname`,`$fathername`,`$coursename`,`$yearsem`,`$facultyno`,`$hostel`,`$roomno`,`$email`,`$mobileno`,`$peradd`,`$district`,`$state`,`$amount`,`$pwd`,'$tnc')";
  
  if (!mysqli_query($con,$sql))
    {
    die('Error: ' . mysqli_error($con));
    }
  echo "1 record added";
  
  mysqli_close($con);
  ?&gt;
  </code></pre>