It sounds like you're using POP to access your mail. If you want both your iPhone and computer to remember what you did with your messages, you'll have to enable IMAP syncing. The directions to do this can probably be found with whatever mail service you're using, assuming it provides that functionality. Cheers.