Chosen Solution
This was a water damaged phone that was given to me by my friend. After watching some youtube videos and guides, I have replaced the charging port circuit and the battery. Everything else on the motherboard looks clean. When powered on, the apple logo comes up then quickly disappears. Itunes will detect the phone. I get the messages " Do you want to allow this computer to access..". I can pick Continue or cancel. Howerver if I continue it tells me to do what it asks me to do on the iphone however the iphone screen is black. I have not been able to get into Recovery or DFU mode. Every time I try I keep getting to the "" Do you want to allow this computer to access.."" question rather than recovery mode or DFU mode. Any ideas would be much appreciated. Thanks.
I took everything apart and put it back together again. Works perfectly. Go figure. Thank you all who tried to help.
Water damaged phones have to be properly decontaminated. Even though it looks fine visually, the water tends to seep underneath the shields and underneath the IC’s, causing all kinds of unpredictable damage. Your best bet is to have it looked at by a repair shop that specializes in water damage repairs.
The first you can try its to clean board with isopropyl liquid even without ultrasonic cleaner. Usually the first where damage from water is the display PMU (U1501) or backlight IC’s (U1502&U1580) because high voltage. If board cleaning not give solution you need some skills and knowledge to find out if some of those chips are damaged.