title: Parse error: syntax error, unexpected 'pname' (T_STRING) in C:\XAMPP\htdocs\testsubmit.php on line 22
body: <p>I 'm trying to store data from a php form to MySql database (phpMyAdmin) and i got the following error: 
  unexpected 'pname' (T_STRING) in C:\XAMPP\htdocs\testsubmit.php on line 22</p>
  
  <p>How can i solve this?</p>
  
  <p>adminform.php</p>
  
  <pre><code>&lt;form action="testsubmit.php" method="POST"&gt;
  Program Name: &lt;input type="text" name= "pname" size="40" maxlength="80"&gt;
  &lt;br/&gt;
  &lt;br/&gt;
  Year: &lt;input type="text" name="py" size="20"&gt;
  &lt;br/&gt;
  &lt;br/&gt;
  Criteria: &lt;input type="text"  name= "pcrit" size="40" maxlength="80"&gt;
  &lt;br/&gt;
  &lt;br/&gt;
  Score: &lt;input type="text" name="psco" size="20"&gt;
  &lt;br/&gt;
  &lt;br/&gt;
  &lt;input type="submit" name="formSubmit" value="Submit"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>testsubmit.php</p>
  
  <pre><code>&lt;?php
  
   define ('DB_NAME','mynewdb');
   define ('DB_USER','root');
   define ('DB_PASSWORD','');
   define ('DB_HOST','localhost');
  
  
   $link=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
  
    if(!$link){
        die('Could not connect:'.mysql_error());
    }
  
  
   $db_selected=mysql_select_db(DB_NAME, $link);
  
   if(!$db_selected){
       die('Can\'t use' .DB_NAME.':".mysql_error());
   }
  
   $value=$_POST['pname'];
   $value2=$_POST[ 'py' ];
   $value3=$_POST['pcrit'];
   $value4=$_POST['psco'];
  
  
   $sql="INSERT INTO new(pname,py,pcrit,psco)              VALUES('$value','$value2','$value3','$value4')";
  
    if(!mysql_query($sql)){
  
         die('Error:'.mysql_error());
    }
  
    mysql_close();
  </code></pre>
  
  <p>?></p>