Why did my gas light go from full to gas and check engine light on? on 2008 Chevrolet Malibu

I was sitting in front of a house waiting for a friend with a full tank of gas, the gas gauge plumeted to empty and the check engine light came on. It did this for almost a week on and off and now the gas light is always on along with the check engine lights. Any suggestions? And also my passenger airbag is off.

2 answers
Get scan test,should show trouble.
have codes scanned at auto zone for free then post