Hey everyone, its me again

Okay, well this Monday night I had a hard time starting the car, but it started. Next morning (Tuesday), I was going to start it, but it didnt start. That whole day I tried to start it, but to no avail. Wednesday, I tried again. A mechanic suggested I hit the gas tank while someone tried to start it. This didnt work either. So yesterday I wasnt able to start it either. After discussing this with Kniedelm9490 today, he asked me if the security light would turn on. I went to check, and the car started very easily. I turned it off, and then was able to start it again. Does anyone know what could have happened or maybe is still happening. Ive got the Ecotec 2.2