petrol light on after putting petrol in not moving at all on 2006 Mazda Mazda6

after putting petrol in it said i had 83 miles in it following day after doing 28 miles it said i only had 14 miles left put more petrol in and it didnt move to start with and light is still on but says i have 36 miles and i have tried finding how to get codes for the mazda too but dont know where to get them from can anyone help please dont fancy running out of petrol in the middle of nowhere

Asked by for the 2006 Mazda Mazda6
go to local autozone, they will scan codes for free then post here so we can advise..