setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "UPDATE `".SHOP_ID."_user` SET `pass`=? WHERE `email`=?"; $stmt = $pdo->prepare($sql); $stmt->execute([md5($_POST['pass']), $_SESSION['email']]); echo "Password updated successfully"; } catch(PDOException $e) { echo "Error updating record: " . $e->getMessage(); } } ?>