Home and Sleep/Wake/Power buttons on my iPhone 4 aren't working?

A couple hours ago, two of the buttons on my iPhone 4 stopped working/have become unresponsive. Therefore, I can't lock/sleep/turn off the phone, nor can I get back to the homescreen. The only app I can use is messaging, for the following reason. I was FaceTiming with a friend for a little bit, and when I got off, it went back to the messaging app, where I had started the FaceTime. Then was when I discovered that the buttons wouldn't work. Therefore, I'm stuck in the messaging app, with the home button not working. The touchscreen is working fine, and I can still text people. I can't activate the Assistive Touch, since I don't have a way to get out of the messaging app. The phone also refuses to 'lock itself', because now it will only dim halfway when I don't touch it for awhile.

Help? I don't have the money to replace/fix it at an Apple Store, and there isn't one near me anyway.

Have a friend text you a url to get to a website to that will want you to download an app (use a friend's iPhone to find one). Click on the url, then click on the link that will take you to the App Store in the webpage you've chosen. It doesn't matter what app it is, just download it. When the app starts downloading, your phone will automatically go to the home screen. Once you're at the home screen you can go into Settings and turn on Assistive Touch.

Turn your phone off & then turn it back on. Then turn assistive touch on. If you can power it off, I would try restoring your phone to factory settings thru iTunes