I have changed my apple id,when i am trying to update my i phone it shows old id .

when i am trying to udate it shows old id and asking for password which i forgot. how can i ad new id for i phone updates
If you are trying to update apps or books purchased with your old ID, you can't do anything to update, just you can only delete them, and download/purchase them anew with your new ID (only remembering your old ID and resigning in with it allows you to update or redownload them).
If you are referring to iPhone updates or iPhone Activation Lock, you have to use your old ID password.
Anyhow, it's possible to contact Apple Support to try and recover your old ID.

Original thread: https://forums.imore.com/threads/i-have-changed-my-apple-id-when-i-am-trying-to-update-my-i-phone-it-shows-old-id.372749/