title: Trying to Get Value of Hidden Field Php -- Getting Error
body: <p><strong>HTML/PHP:</strong></p>
  
  <pre><code>            &lt;?php if(!empty($_GET['pID'])) $the_pID = mysql_real_escape_string($_GET['pID']); 
              #echo $the_pID;
              ?&gt;
  
              &lt;form action="inc/q/prof.php?pID=&lt;?php echo $the_pID; ?&gt;" method="post"&gt;            
              &lt;select id="courseInfoDD" name="courseInfoDD" tabindex="1"&gt;&lt;?php while($row3 = $sth3-&gt;fetch(PDO::FETCH_ASSOC)) {
                    echo "&lt;input type='hidden' name='cID' value='$_POST['cID']'";
                    echo "&lt;option&gt;&lt;?php".$row3['prefix']." ".$row3['code']."&lt;/option&gt;"; }echo "&lt;/select&gt;"; ?&gt;
              &lt;input type="text" id="addComment" name="addComment" tabindex="3" value="Enter comment" /&gt;
  
          &lt;input type="hidden" name="pID" value="&lt;?php echo $the_pID; ?&gt;"&gt;
          &lt;input type="submit" name="submit" id="submit" /&gt;
          &lt;/form&gt; 
  </code></pre>
  
  <p><strong>PHP/MYSQL</strong></p>
  
  <pre><code>&lt;?php // Get select box options 
  $pID3 = filter_input(INPUT_GET, 'pID', FILTER_SANITIZE_NUMBER_INT);
  $username = "###";
  $password = "#####";
          $pdo3 = new PDO('mysql:host=#####;dbname=####', $username, $password);
          $pdo3-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
  $sth3 = $pdo3-&gt;prepare('
      SELECT pID, C.cID, C.prefix, C.code
      FROM Department D, Course C, Professor P
      WHERE pID = ?
      AND D.dID = C.dID
      AND D.dID = P.dID; 
  ');
          $sth3-&gt;execute(array(
              $pID3
          ));
  ?&gt;
  
  &lt;?php
  
  $connect = mysql_connect("#####", $username, $password) or die ("Error , check your server connection.");
  mysql_select_db("####");
  
  //Get data in local variable
  if(!empty($_POST['addComment']))
      $INFOO=mysql_real_escape_string($_POST['addComment']);
  if(!empty($_POST['pID']))
      $PIDD=mysql_real_escape_string($_POST['pID']);
  if(!empty($_POST['courseInfoDD']))
      $COURSEE=mysql_real_escape_string($_POST['courseInfoDD']);
  
  #print_r($_POST);
  echo $the_pID;
  
  // check for null values
  if (isset($_POST['submit'])) {
  $query="INSERT INTO Comment (info, pID, CName) values('$INFOO','$PIDD','$COURSEE')";
  mysql_query($query)  or die(mysql_error());
  echo "Your message has been received";
  }
  #else if(!isset($_POST['submit'])){echo "No blank entries";}
  #else{echo "Error!";}
  ?&gt;
  </code></pre>
  
  <p>I get the following error with the HTML/PHP above:<code>Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING</code></p>
  
  <p>I feel like it deals with this line: echo <code>&lt;input type='hidden' name='cID' value='&lt;?php echo '$_POST['cID']';?&gt;&lt;option&gt;".$row3['prefix']." ".$row3['code']."&lt;/option&gt;"; }echo "&lt;/select&gt;"; ?&gt;</code></p>
  
  <p>Does anyone see a problem here?</p>