Iphone 5 keeps dying and doesn't recognize cords?

I bought this phone 5 off craigslist worked fine for a month or so now it keeps turning off and won't recognize cords. Since obv I'm out of warranty I tried replacing the battery and it worked the swap part but nothing has changed. I'm very interested in more careful DIY repairs does anyone know the reason this is happening and the parts I need to repair?

Added (1). The screen is cracked but It works fine i just keeps showing up as a cord not a lightning bolt.

Replace screen

Hold the home button and the top bottom (standby button) for 15 seconds. After the 15 seconds do so again. This will restart the device completely but you won't lose info. Usually helps for this issue.

  • What cords do I need to connect my iPhone 5c to the tv? I'm not sure if I needed to buy two separate cords like the hdmi and lighting digital What stores?
  • I have an iphone 4, battery keeps dying? How do i stop my battery from dying even though i aint even using it. I keep my cel in my pocket while i'm working, but when i go take my break its already at 50% but it was 100% when i started working just 2 hours before
  • My iPhone keeps dying at 30-40%? It this a battery malfunctioning? I sent in a diagnostic test to Apple online and they said my battery passed the test and it's working fine. Any fix? I already reset this with the power and home button but no use! Should I trade in for a new one?
  • My iphone battery keeps dying and I'm not using it? It is connected to the Wi-Fi in my house, so not 3G. It will be 100% before I go to bed, then by the time I wake up in the morning the battery has died. The battery is draining when I'm not using it? Today I charged it to 95%, was home for a couple of hours, didn't use it and now it is at 4%?! What is wrong with it? I don't have any new apps or anything, it's never done this before!