我想将sweetalert的inputValue插入到我的数据库中。我有一个要插入的查询:
swal("Nice!", "Notes: " + inputValue, "success");
但它不起作用
我的代码:
function show_confirm_delete<?=$data->proposalID?>(){
setTimeout(function () {
swal({
title: "Yakin ingin me-reject Proposal?",
text: "Beri alasan kenapa anda mereject proposal ini.",
type: "input",
showCancelButton: true,
closeOnConfirm: false,
animation: "slide-from-top",
inputPlaceholder: "Tulis disini"
},
function(inputValue){
if (inputValue === false) return false;
if (inputValue === "") {
swal.showInputError("You need to write something!");
return false
}
swal("Nice!", "Notes: " + inputValue, "success");
window.location.href = "proses-reject.php?id=<?=$data->proposalID?>";
}); }, 1);}
请帮帮我。谢谢!