han = he (subject pronoun)
ham = him (object pronoun)
hans = his (possessive pronoun)
I believe that han is starting to be used as an object pronoun, but that it's far from universally accepted. I'd recommend sticking with ham for the object pronoun.
N.B.: I'm not a native speaker.