好了,我有一個SELECTPHP/SQL刪除按鈕的每一行
$filme_cart = mysql_query("SELECT name, price FROM cart_test GROUP BY name");
,然後我有一個PHP代碼,看起來像這樣:
<?php
while($film_cart=mysql_fetch_object($filme_cart))
{
echo "<tr>";
echo "<td align='left'>";
echo $film_cart->name;
echo "</td>";
echo "<td class='cart-product-setting'>";
echo $film_cart->price;
echo "<a href='delete.php?delete_film=".$film_cart['id_film']."' class='remove-pro' rel='tooltip' data-title='Delete'><i class='icon-trash'></i></a></td>";
echo "</tr>";
}
?>
而且我delete.php文件看起來是這樣的:
<?php
include 'config.php';
$delete_film=$_GET['id_film'];
$delete_cart = mysql_query("DELETE FROM cart_test WHERE id_film='$delete_film'");
?>
所以,當我把PHP代碼在我的網頁,我<body>
消失。
我在做什麼錯?
什麼會消失? –
請修復該格式。 –
@AbhikChakraborty
「This disappear」 and –