How can I make my HTML table rows editable using PHP? [closed]
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 hours ago.
开发者_Python百科 Improve this questionI can't seem to edit my table rows using PHP. I'm new to this language so I'm having some trouble.
I have created a table with rows using PHP. The data inside my rows is created by fetching my database MySql table. I want to allow the user to edit information for each row. I'm not sure how to do this in PHP.
Below is my PHP code:
echo "<table border='1'>
<tr>
<th>Job ID:</th>
<th>Job Title:</th>
<th>Min Salary:</th>
<th>Max Salary:</th>
</tr>";
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['job_id'] . "</td>";
echo "<td>" . $row['job_title'] . "</td>";
echo "<td>" . $row['min_salary'] . "</td>";
echo "<td>" . $row['max_salary'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($conn);
精彩评论