Sweetalert的确认不起作用

时间:2018-06-15 07:14:28

标签: html compiler-errors sweetalert2

你好,所以基本上我的问题是,当我点击删除按钮时,sweetalert完美弹出,但是当我点击确认按钮“是删除它”之后没有被执行。以下是我的index.php& delete.php文件。

**delete.php**
<?php
header('Content-type: application/json; charset=UTF-8');
$response = array();

if ($_POST['delete']) {

    require_once 'dbConfig.php';

    $pid = intval($_POST['delete']);
    $query = "DELETE w,e
FROM Table_Test_CSV_ramanora w
INNER JOIN `csvname` e
  ON w.CsvName=e.Csvname
WHERE w.CsvName =:pid";
    $stmt = $DBcon->prepare( $query );
    $stmt->execute(array(':pid'=>$pid));

    if ($stmt) {
        $response['status']  = 'success';
 $response['message'] = 'Product Deleted Successfully ...';
    } else {
        $response['status']  = 'error';
 $response['message'] = 'Unable to delete product ...';
    }
    echo json_encode($response);
}

这是delete.php文件。我的问题主要在这个文件中!

try (Connection conn = getConnection()) {
    ...
    Target t = new Target(conn);
    ...
}

请帮帮我。

0 个答案:

没有答案