$ID is not a global, but $_SESSION["ID"] would be... Gerry http://groups.yahoo.com/group/php_and_mysql/ On 3/9/06, suresh kumar <asureshkumar_1983@xxxxxxxxxxx> wrote: > > i am having one problem in session handling. > I am having 2 files,login page and hame page. > when user enterd user name and password in login page > .i used session to store the user id .in my second > home page.i retrieve the user id.now i want the user > id to be availble in my thrid page.plz help me.this is > my code. > > login.php > session_start(); > $ID=$userid; > session_register("ID"); > > homepage.php > session_start(): > echo $ID //this is working fine > > > > thirdpage.php > session_start(); > echo $ID //not working >