我一直在使用此代碼從數據庫中刪除數據。我喜歡的是,無論何時用戶單擊圖像鏈接以刪除確認功能中的數據,都會提示並要求採取措施,我在此代碼中遇到了錯誤。php使用javascript驗證函數的超鏈接
$delurl = "delete_dish.php?dish_id=".$row['id'];
$img = "<img src = 'images/delete.png'>";
echo "<a href=".$delurl.";
echo "onclick='return confirm('Are you sure you want to delete.')'>".$img."</a>";
也許錯誤是在雙引號或單引號,任何幫助提前
感謝
什麼是錯誤? – Don 2012-08-08 17:50:49