Plug tyhe charger in. Leave it plugged in for 24 hours. Turn the phone on while the charger is plugged in. If it still does the same thing, the odds are that it's not a dead battery. (It could be a bad battery, but after charging for 24 hours, it should have enough charge to stay on for a few minutes, at least.)