I am really thankful to you for the reply.I would also like to know one more thing.What if the user clicks on the logout link,how do i redirect him to the home page and can i maintain session of the logged in user using this function.Sorry for so many silly doubts.