When asking for help, it tends to be useful to do more then just write down some code. So given the title, I'm guessing you're having trouble getting sessions to work. What have you tried to do to fix it? Have you tried putting session values outside of the if statements? If you print_r($_SESSION) anywhere, does it give you the data you expect?
Also, its bad form, and technically wrong, to put a meta tag outside of the head tag. In addition, this has nothing to do with mySQL, and is a PHP question.