我有一个表格,里面装满了我的数据库中的数据,我希望它旁边有一个按钮,供每个特定用户删除该用户。但我该怎么做?
这是代码:
<?php
include '../includes/db_connect.php';
$sql = "SELECT * FROM `users`";
$result = mysql_query($sql, $connection) or die ("Failed to excecute the query $sql on $connection");
?>
<table border=1>
<tr>
<th>
Access lvl
</th>
<th>
Username
</th>
<th>
Email
</th>
</tr>
<?php
while($row = mysql_fetch_array($result))
{
echo "</td><td>";
echo $row['access'];
echo "</td><td>";
echo $row['username'];
echo "</td><td>";
echo $row['email'];
echo "</td></tr>";
}
echo "</table>";
?>