Year, make, model and engine would help but, a bad timing belt or a bad fuel pump could do that.
Possible a bad or corroded ground cable .
I am no mechanic, but I had the same problem on my 95 Ford Taurus SHO. My car would just shut down while I was driving and turn on for awhile after it shut off. After looking around, I found out it was the crankshaft positioning sensor. I changed it out, and that fixed the problem. I suggest to look online taking to consideration your make and model of your vehicle.
yep... especially if the alternator is bad too
fuel pump
Had to disconnet my radio it was shorting out the engine.
toyota mr 2
Faulty ignition wires, distributor cap and rotor could be to blame.
Yes! I got a 1994 MX6 and it would shut down while driving when your oil is low.
If it won't crank, which is probably what you really have going on, it means your battery went bad while you were driving.
Contaminated gas or the wrong type of fuel for the vehicle.
Not likely.
A bad camshaft sensor can cause intermittent starting. The car may just shut off while driving. It also may not start or could shudder and backfire.