我试图在用户删除数据之前将弹出消息放入此代码中。这是我的代码。
while ($test = mysql_fetch_array($result))
{
$id = $test['FailID'];
echo "<tr align='center'>";
echo"<td><font color='black'>" .$test['FailID']."</font></td>";
echo"<td><font color='black'>" .$test['TajukFail']."</font></td>";
echo"<td><font color='black'>". $test['JilidFail']. "</font></td>";
echo"<td><font color='black'>". $test['StatusFail']. "</font></td>";
echo"<td> <a href ='daftarkemaskini.php?FailID=$id'>Edit</a>";
echo"<td> <a href ='padamfail.php?FailID=$id'><center>Delete</center></a>";
echo "</tr>";
}
但是当我把它放在那里时,它根本不起作用。
echo"<td> <a href ='padamfail.php?FailID=$id' onClick="return confirm('are you sure you want to delete??');"><center>Delete</center></";>"
谁可以帮我这个事?