php - Putting a form field inside a table -


i need help.

i getting error parse error: syntax error, unexpected '<' in:

i wanting have text field appear right of data output mysql first , last name. data db displays great right until put in code text field inside while loop , error see above. not sure there syntax error or if code structure wrong, offer ideas please?

<html> <body> <form action="pts_editing.php" method="post"> <table border="1">  <?php  $con=mysqli_connect("localhost","myusername","mypassword","srrdb");                          if (mysqli_connect_errno())                          {     echo "failed connect mysql: " . mysqli_connect_error(); } $result = mysqli_query($con,"select * students");                    $results variable while($row = mysqli_fetch_array($result))                                    {     echo "<tr>"."<td>".$row['fname']."&nbsp".$row['lname']."</td>"."<td>".                 <input type="text" name="dpoints">."</td>"."</tr>";      }  mysqli_close($con);  ?>  </table> </form> </body> </html> 

you forgot surround part in single-quotes:

<input type="text" name="dpoints"> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -