I have a validation servlet that sets a variable named "username" using setAttribute() in a Session. This servlet redirects the page to a html file, which is in frames. The 1st section of the frame is a php file. I want to retrieve this variable in my PHP code. The regular way to access the php session variable is like this echo "UserName=". $_SESSION['username'];. This result is returning null. How do I solve this problem ?