Don't ever do that. You'll cause an explosion. What you should do is this.
1. First and most important of all, 'Do Not Panic'.
2. Turn off the source of heat. If you are using LPG, turn off the regulator.
3. Dip a towel in water, wring it, fold it and gently cover the flaming pan with it.
4. Now watch this video a friend sent me.