Chosen Solution

i dropped my iphone in the toilet and it was working for awhile but then i turned it of to restart it but now it is flashing from the apple logo to black when it is plugged into the chager but when i take it off it goes black again.

The inside of the phone probably has corroded a bit. Over time the corroded components and become more damaged. You would need to take it apart clean it with a toothbrush and rubbing alcohol. See if that fixes it. If not then you can see if one of the parts need to be replaced.

need new battery also if its doing boot loop clean it with 70% acohol