这种语法对我不起作用。我正在从 html 脚本中发布一个变量,当回显时它将打印该数字。
但是,当我尝试通过 SQL 删除它时,它不起作用。
<?php
$idholder = $_POST['delete_id'];
$con=mysqli_connect("hostaddress","username","pw","db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con,"DELETE FROM SWANK_support WHERE order='$idholder'");
mysqli_close($con);
header ("location: /support.php");
?>