replace your crank sensor....or when it dies dump cold water on it to see if it starts again
I would change your fuel filter
This is a typical symptom for a failing fuel pump relay.
you have to take it to a repair shop if you dont know why it does that & the people at the repair dont know what the heck is wrong with it. Sell it buy a new one and shut the f*** up .
More info. What kind of car ?
If has distrib , ( cant remember if dist less yet) it may be the pickup coil in dist.
Check your fuel filter and pressure.
Either it starts and dies, or it will not crank.Either it starts and dies, or it will not crank.
crank sensor ?
2007 honda civic starts up then dies
Lack of fuel .
call the guys on car talk.