How do I reset the APN number on my z998 AT&T phone and convert it to straight talk?

I have an AT&T Z998 and I changed it to straight talk. I went and master reset it because the phone was acting crazy. After I did that, it went back to AT&T. I need to know how to reset the APN number for straight talk.