$deleteID = $_POST['oz'];
if(!$deleteID){
echo '2';
die;
} else {
//It should be working.
}
$checkVar = $pdo->prepare("SELECT * FROM `user_posts` WHERE `id`=:delete");
$checkVar->bindValue(':delete',$deleteID,PDO::PARAM_STR);
if($checkVar->execute() == false){
echo '2';
die;
}
I'm really pissed off. $deleteID is supplied, nothing is being binded. Why not, please someone help.
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
after connect.
For the
Table doesn't exist
problem you have to check for mistakes like typos, letter case, wrong server connected, wrong PHP file edited etc. Say, you are running your PHPMyAdmin against localhost while actual script against remote host or something of the kind.