[eluser]veledrom[/eluser]
Hi,
I am calling function below to update password but how to a make sure that it has been successfully updated or failed?
Thanks
Code:
public function update_myself($user_id, $text_new_password)
{
$sql = "UPDATE login SET password = SHA1(?) WHERE id = ?";
$this->db->query($sql, array($text_new_password, $user_id));
if(... blah blah ...)
{
return 'Success';
}
else
{
return 'Fail';
}
}