PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I do understand what you are saying...
but shouldn't ---> $country = 'china';
work as well?
is it because of my apache setting is missing something?
or that because I am using localhost?
It's because $_SESSION['country'] and $country are 2 seperate variables. You managed to set a session variable using session_register in the first script, which is not the recommended method. You should set session variables by assigning values to the appropriate key in the $_SESSION super global array.