[英]Jtable Delete not Deleting
I'm having a problem with the Jquery Jtable plugin delete method. 我在使用Jquery Jtable插件删除方法时遇到问题。 The variable 'email' is passed between pages and into the .php file.
变量“ email”在页面之间传递,并传递到.php文件中。 The list action function works, so I know it isn't a connection issue.
列表操作功能有效,所以我知道这不是连接问题。 My database name is maps.
我的数据库名称是maps。 Below is my code: Javascript:
下面是我的代码:Javascript:
var emailHolder="email@email.com";
var file="c";
function loadForm()
{
$("#my-form" ).dialog( "open" );
}
$(document).ready(function () {
//Prepare jTable
$('#PeopleTableContainer').jtable({
title: 'Table of people',
actions: {
listAction: 'PersonActions.php?action=list&emailHolder='+emailHolder,
deleteAction: 'PersonActions.php?action=delete&emailHolder='+emailHolder+"&fileHolder="+file
},
fields: {
filename: {
key:true,
title: 'File',
width: '40%'
},
email: {
title:'User',
key: true,
create: false,
edit: false,
list:false
}
}
});
Php:
{
$email= $_GET['emailHolder'];
//Delete from database
$result = mysql_query("DELETE FROM maps WHERE (email='$email' and filename = " . $_POST["filename"] . ");");
//Return result to jTable
$jTableResult = array();
$jTableResult['Result'] = "OK";
print json_encode($jTableResult);
}
我不确定尝试从jtable的“电子邮件”字段中删除“密钥”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.