hi,
i have this login page,after the user enter user id and password and click on submit.it goes to a ManagerHome page.inside the ManagerHome page there are several hyperlink which will link to different page.
my problem now is i must check that the user has login in successfully before going into either the ManagerHome page or the hyperlink pages,because right now i can just enter the url and goes straight to that page without going into the login page.
how can i check that the user must login first before enter into other pages,using cookie or session???i try using cookie.
on the starting of the login page i setcookie("check","true");
then on the ManagerHome page i put
if($check=="true")
//display the ManagerHome page
else
//go back to login page
however the above code give me some problems.immediately after i enter the code and save it,i go to the broswer and enter the ManagerHome url into the address bar,it will direct me back to login page(this is ok),but when i try to login it will not display the ManagerHome page,it will always direct me back to the login page.then i try to enter to the ManagerHome page directly by entering the url,i can go in!!! so i try to login again and now i can go into the ManagerHome page. But if i close the browser and open a new broswer,i can go into the ManagerHome page directly without going though the login page..
why is this thing happening,how can i ensure that the user must login before entering to other page???how can i destroy the cookie when the broswer is close???
i need help urgently...someone PLS HELP ME!!!!