can you not get it up at all, or just occasionally? For example, if you are home alone watching porn can you get it up? Has this only happened when you are with her?
If you can still get it up at all, then you know your shit isnt broken.. its most likely in your head (the one with the brain) which is causing your problems.
I am 25, and just lost my virginity last year (waited forever), to a girl that Im totally in love with. The first couple of times that we wanted to have sex.. I was just flat nervous as hell (what if she doesnt like it, what if I suck, what if im too small, what if i come too fast) all that shit was runnin through my mind. I was thinking too much about shit, instead of just going with the flow, we tried a couple of times... and every time no dice. Id be all ready to go, moment got there... and willy went limp. Needless to say it was a bit embarrasing, but I knew it was just me being nervous, and I think she knew it too. She never really said anything, and then one night she climbed on top of me, and just slipped it in.. I didnt really think about it, wasnt nervous it just happened. Once we did it... i was ok, i was like... what was I so afraid of? Now im a fucking sex junky, and cant keep my hands off her. There has been a couple of occasions where I was ready to go... and she wasnt yet and by the time she was ready (wet) i wasnt really hard anymore. Just break out some astroglide (this shit feels amazing) usually takes me about 5 seconds with that shit to get Mr Happy all happy again.
Another thing that bothers me sometimes is condoms.... sometimes I cant feel shit when I have one on, so Ill enter her without one until Im really getting into it, then Ill put one on. Ive lost my hardon a couple of times right after, or during putting a condom on... again a little hand action (from me or her) with some lube, or some head and im usually good to go.
Wow this is getting long... anyways, I wouldnt freak about it yet. Just relax and enjoy the hottie you are with... and try not to think about "what if I go limp again" because as soon as you start that shit, youll be like 3 inches of cooked spaghetti.
Good luck.