我有一个简单的表单,但我想动态地将表单操作从插入更改为在同一页面中更新,并且我想在同一页面中显示值。我在href
链接中写了更新。请帮我。
<?php
$username="root";
$password="";
$database="test";
include"db.inc.php";
$order = "SELECT * FROM tablename1";
$result = mysql_query($order);
while ($row=mysql_fetch_assoc($result)){
echo ("<tr><td>$row[sno]</td>");
echo ("<td>$row[name]</td>");
echo "<td ><a href=\"test.php?id=".$row['sno'] . "\" onclick=\"return confirm('Are you sure you want to edit datas?');\">Edit</a></td>";
echo "<td><a href=\"insert1.php?id=".$row['sno'] . "\" onclick=\"return confirm('Are you sure you want to delete?');\">Delete</a></td></tr>";
}
?>