(就是這樣,我不知道如何在每行的「編輯列」下添加編輯按鈕。) 請爲我提出解決此問題的任何解決方案。如何在HTML表格的每一行上添加編輯按鈕
enter link description here
http://localhost/test/logindetails.php?edit=Modify#
enter code here
<?php
// making connection
$conn=mysqli_connect('localhost','root','') ;
// selecting database
mysqli_select_db($conn,"company") ;
$sql= "SELECT * FROM login" ;
$records=mysqli_query($conn,$sql) ;
?>
<html>
<head>
</script>
<title>Details!!!!</title>
</head>
<body>
♠
<h2>Details!!!!!!!!!</h2>
<div>
<table width="600" border="1" cellpadding="1" cellspacing="1">
<tr>
<th>Id</th>
<th>Username</th>
<th>Password</th>
<th>Edit</th>
</tr>
</div>
<?php
while($std = mysqli_fetch_array($records))
{
echo "<tr>";
echo "<td>" . $std['id'] . "</td>";
echo "<td>" . $std['username'] . "</td>";
echo "<td>" . $std['password'] . "</td>";
echo "<td>" . $std['Edit'] . "</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
什麼你試過這麼遠嗎?你能告訴我們你的代碼嗎? –