#deduct from the transferred account $update = $DBH->prepare("UPDATE USER SET BALANCE = BALANCE - ? WHERE USERNAME = ?"); $update->execute($amount, $user); $up = $update->finish(); #add to the receiving account $update1 = $DBH->prepare("UPDATE USER SET BALANCE = BALANCE + ? WHERE USERNAME = ?"); $update1->execute($amount, $user); $up1 = $update1->finish();