Your code is really confusing, but from what I can see, you're trying to access a $_POST variable before it's been sent. You can't do that.
Also, try using MVC. It will help keep your code neater.
edit: misread your OP, adjusted accordingly
I don't really understand what you're trying to do. It would be really confusing UX-wise if I tried to change my country in the settings, then coming back to it and having the country that I had before selected.
It would probably be easier to make a field in your database for last...