如何将甜蜜警报类型输入插入数据库

时间:2017-04-04 13:53:22

标签: javascript php mysql sweetalert

我想将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);}

请帮帮我。谢谢!

0 个答案:

没有答案