I think most would say you had no risk of HIV. But how do you not know your penis is hanging out of your pants? Regardless, that is definately low risk for HIV. As far as other STDs, I would get tested because some of those are much more easily transmitted. With this in mind, I still think you are safe.
BTW. This is not the Dr. to patient forum. You have to post in there to get questions answered by him, and it costs 15 US dollars. NO ONE IN THIS SECTION OF THE FORUM IS QUALIFIED TO GIVE YOU MEDICAL ADVICE.
Thanks farfromperfect. It had just popped up of the top of my pants (not through the zip). When do you think I should go for tests.