尝试通过我的网站从数据库中删除数据,但数据没有被删除

时间:2016-02-20 01:03:02

标签: php

我正在尝试从数据库中删除数据并且代码不会丢失任何错误但数据未被删除

<?php
ini_set('display_errors', 1);
require('../../../../includes/conn.inc.php');
require('../includes/functions.inc.php');
// sanitize user variables
$sFixtureID = safeInt($_POST['fixtureID']);
// prepare SQL
$stmt = $mysqli->prepare("DELETE FROM matchFixtures WHERE fixtureID = ?");
$stmt->bind_param('i', $sFixtureID);
$stmt->execute();
$stmt->close();
header("Location: ../../protected_page.php");
// redirect browser
exit;
// make sure no other code executed
?>

0 个答案:

没有答案