IPhone 3G Unresponsive touch screen?

Earlier on today my phone was working fine, i left it in my purse for a while and when i went to check it, i was getting a call but was unable to answer it. My home button wouldn't work and I was on the contacts screen so i just went to a contact and clicked "text message" and replied to some messages.
My phone eventually auto-locked and the screen was unresponsive, i could double tap the home button now and the iPod controls came up. I receive calls and texts but i just cant unlock it
i've tried everything, or so i think?
I also took out my sim card hoping that would do anything, but nothing happened, and now my phone is locked because i have a password on my Sim card.
I'm on a 3-year contract so i'm pretty much stuck with this phone and can't upgrade because I'm trying to leave my current carrier. My contract is up late november, and it is quite old. The battery has been replaced once a couple months ago.
Also, the lock button is long gone, and does not work at all. Yes, it's an extremely old phone! Any ideas? Thanks in advance

The connection got loose or you need a new screen

Itunes restore? Or hold the power button and home button for ten seconds until it flashes and restarts. Hopefully you can unlock it… Why would you put a password on a sim card.