我正在尝试在用户删除数据之前,在此代码中放置弹出消息。这是我的代码。
但是当我把它放在那里时,它根本不能工作。
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></";>"
有人能帮我解决这个问题吗?