0
我想從數據庫中刪除一行數據,點擊提交輸入後。PhP從數據庫中刪除行onsubmit
if (isset($_POST['submit'])) {
// sql to delete a record
$query = "DELETE * FROM wishList
WHERE userID_FK = {$_SESSION['user_id']}
AND itemName = {$row['itemName']}";
$result = mysqli_query($dbc, $query);
if($result)
{
echo 'Data Deleted';
}else{
echo 'Data Not Deleted';
}
}
問題是什麼? – maszter
查看下面的答案。可能有幫助。 –