先附上我的程式碼
$(".box").click(function(e){
var removetype = e.currentTarget.dataset.removetype;
/*mailbox*/
if (removetype=='select_del')
{
$.ajax({
type: "POST",
url:"del?to="+removetype,
data:$("#selectid").serialize(),
cache: false,
success: function(){
}
});
}
});
del
$user = $_GET['to'];
if ($user=='select_del')
{
$getid=$_POST['id'];
foreach($getid as $value)
{
$DEL = mysql_query("
DELETE FROM `資料表名稱`
WHERE `id` = '".$value."'
");
}
}
以上是我的程式碼...
但卻無法運作
所以我想問看看這樣做法是不是對的?
確定id與資料表名稱無誤
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你可以尝试替换为
如果不行的话,我觉得你需要检查一下脚本的写法,是否符合规范.如:
<a class=" <?php if($status==1): ?>selected<?php endif; ?>" >RETURN</a>你这么写
我不认为它能够正常工作....