title: Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files (x86)\EasyPHP-5.3.9\www\Inventory\addavaya.php on line 20
body: <p>I'm new to PHP and get the message Parse error: syntax error, unexpected T_VARIABLE in .. on line 20. I would be ever so grateful if someone could help me with this error as it's really started to stress me out. Been on dreamweaver and it says error where it says $Username=... But I just can't seem to fix it       </p>
  
  <pre><code>&lt;?php
      $host="localhost"; // Host name 
      $username="xxx"; // Mysql username 
      $password="xxx"; // Mysql password 
      $db_name="xxx"; // Database name 
      $tbl_name="avaya"; // Table name
  
      mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
      mysql_select_db("$db_name")or die("cannot select DB");
  
  
      $con = mysql_connect("localhost","root","");
      if (!$con)
        {
        die('Could not connect: ' . mysql_error());
        }
      mysql_select_db("inventory", $con)
  
  
      $addavaya="INSERT INTO avaya_pabx(critical_spare_id, serial_no, ,comcode, version, circuit_pack, classification, location, availability, date, client)
      VALUES ('$_POST[critical_spare_id]', '$_POST[serial_no]', '$_POST[comcode]', '$_POST[version]', '$_POST[circuit_pack]', 
      '$_POST[classification]', '$_POST[location]' , '$_POST[availability]', '$_POST[date]', '$_POST[client]')";
  
  
      mysql_query($addavaya,$con)
  
      if (!mysql_query($addavaya,$con))
        {
        die('Error: ' . mysql_error());
        }
      echo "1 record added";
  
      mysql_close($con);
  
      ?&gt;
  </code></pre>