i have a panel to confirm the users, there can be multiple selections with option select exc. I did the delete users part and its working perfect but with updating them to confirmed, i have some problems, i cant update the value of confirmation, here are the codes:
The Update Code from Panel :
if(isset($_POST["members"])) {
$members = $_POST["members"];
while(list($index, $member_id) = each($members)) {
confirmMembers($member_id); }
$msg = "Success";}
else { $msg = "Error"; }
The confirmMembers Function :
function confirmMembers($member_id) {
global $db, $log;
try {
$confirm_member = "UPDATE `members` SET `confirmed` = 1 WHERE `member_id` = :member_id LIMIT 1";
$confirm_member_do = $db->prepare($confirm_member);
$confirm_member_do->bindParam(':member_id', $member_id, PDO::PARAM_INT);
$confirm_member_do->execute();
return true;
} catch(PDOException $e) {
$log->logError($e." - ".basename(__FILE__));
return false;
}
}
Thanks
var_dump($confirm_member_do->errorInfo())return anything?