且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP Mysql - 删除按钮继续删除最新行

更新时间:2023-12-04 11:35:16

您必须在这里传递 $ _ POST ['postid ']

if(isset($_POST['posteraser'])){
   $postid = $_POST['postid'];
   $sql = query("DELETE FROM post_list WHERE postid = '$postid' ");       
   redirect ('home.php');
}

b
$ b

OR as procedure way

$sql = query("DELETE FROM post_list WHERE postid = ? ",$postid);