The difference between them for someone who has no previous camera knowledge doesn't really matter.
Buying a D90 or something will get you no better results than a D40 at this stage. Buy the one that feels comfy that you can afford.
Then practice. Practice more. Then practice again. And again. Then keep doing that. Read tutorials. Look at flickr for inspiration and you can see the EXIF too. Then practice.
A lot of people think buying an SLR is an automatic way of much better pictures. It really isn't. If you're just going to buy it, stick it on auto and want to click and go, then it's not really for you and you're probably better off with a Lumix. If you're going to practice and stick with it when your first shots look no different that they would with a phone, then get the SLR.