Gas light-Check engine light- tank said empty gas on 2003 Dodge Ram 1500

I was driving down the freeway and my gas light and check engine light came on and it said i didn't have any gas but I had just filled it up. what could it be? I was able to drive it home.

Asked by for the 2003 Dodge Ram 1500
It is most likely your Fuel Sending unit. This will set a Check Engine Light when it malfunctions. Have the code retrieved just to be sure though.
The Fuel Cap will not trigger the low fuel light, that is controlled by the Fuel Sending Unit in the Fuel Tank.

Good Luck!
1 more answer
You may need to try reinstalling the gas cap. If not put on properly and secured tight it can possibly cause this problem. Good Luck!!!