title: Putting a form field inside a table
body: <p>I need some help.  </p>
  
  <p>I am getting the error Parse error: syntax error, unexpected '&lt;' in:</p>
  
  <p>I wanting to have a text field appear to the right of data output from MYSQL which is just a first and last name.  The data from the DB displays great right up until I put in the code for the text field inside the while loop and then I get the error you see above.  I am not sure it there is a syntax error or if my code structure is wrong, could someone offer some ideas please?</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action="pts_editing.php" method="post"&gt;
  &lt;table border="1"&gt;
  
  &lt;?php
  
  $con=mysqli_connect("localhost","myusername","mypassword","srrdb");                         
  if (mysqli_connect_errno())                         
  {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  $result = mysqli_query($con,"SELECT * From students");                  
  
  $results variable
  while($row = mysqli_fetch_array($result))                                   
  {
      echo "&lt;tr&gt;"."&lt;td&gt;".$row['fname']."&amp;nbsp".$row['lname']."&lt;/td&gt;"."&lt;td&gt;".
                  &lt;input type="text" name="dpoints"&gt;."&lt;/td&gt;"."&lt;/tr&gt;";     
  }
  
  mysqli_close($con);
  
  ?&gt;
  
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>