php - Trying to fix button or sql query
one text
Solution:
The problem is you are preparing the query (in the wrong way, because of 2 reasons: $db
is undeclared and also the query is incorrect), but you have never bound your parameters and executed it:
$db = new mysqli($HOST,$USER,$PASS,$DATABASE); // these variables should be defined based on the database credentials
$stmt = $db->prepare("DELETE FROM `profile_post` WHERE `profile_post`.`post` = ?;");
$stmt->bind_param("i", $postid1);
$stmt->execute();
Source