I tried to use my Nikon D5100 at work today and my camera would not auto focus. I set it in manual mode and every time I take a photo the bottom is completely black. I switched the Lens to the kit lens and same thing. Also switched to portrait setting and auto settings and same thing. I've had this camera a few months and all of a sudden today it's not working for me. Please help!
Because it has stopped Auto Focusing, I suspect it could be a problem with the sub-mirror or main mirror. Take a look inside the front of the camera to make sure it is operating properly when you activate the shutter. The mirror should fold up flat against the bottom of the viewfinder to allow an unobstructed path for the light through the shutter and onto the image sensor.
Here is a video showing how the sub mirror gets hung up and partially blocks the light. This will cause a black bar near the bottom of the image: Nikon D610 broken mirror
Here is a video showing another type of mirror failure: Broken Nikon Mirror
If the mirror is okay, and assuming that you are not using a flash, it might mean your shutter has failed and needs to be replaced.
Replacing the mirror or shutter might cost $300-$400. Used D5100 cameras sell for about $200 on ebay so you are actually better off to buy a used D5100.
Better yet, spend a bit more and spring for a newer camera with upgraded features.