title: PHP: Error :Syntax to be user near '='a_name','='another_name' at line 1
body: <p>Below is the code where I'm getting error:</p>
  
  <pre><code> $f1=$row['ParentName'];
   $f2=$row['Full_Name'];
   $f3=$row["Address_1"];
   $f4= $row['Address_2'];
   $f5=$row['City'];
   $f6=$row['State'];
   $f7=$row['Country'];
   $f9=$row['Contact_No'];
  
   $sql1="UPDATE login_signup ".
                             "SET $f1=' ".$_POST["pname"]." ',$f2= ' ".$_POST["fname"]." ', $f3= ' ".$_POST["addr1"]." ',$f4= ' ".$_POST["addr2"]." ',$f5= ' ".$_POST["city"]." ', $f6= ' ".$_POST["state"]." ',$f7= ' ".$_POST["country"]." ', $f9= ' ".$_POST["cn"]." ' ".
                             "WHERE $var= ' ".$_POST["email"]." '";
  </code></pre>
  
  <p>Error is something like this:</p>
  
  <blockquote>
    <p>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 '=' ABCD ',= ' XYZ ', = ' dfgh ',= ' ZXCV ',= '' at line 1</p>
  </blockquote>
  
  <p>ABCD,XYZ,ZXCV,dfgh--Submitted through form for fullname,parentname....respectively</p>