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']." ".$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
Post a Comment