On the page I am making, users with a log in enter their details and will be taken to the restricted page. I would like this sliding panel to be on every page when the user is not logged in.
Once they log in from the sliding panel they can still surf around all the main site pages. When they log out the session dies and it reverts to the home page.
However, when they are logged in I would like the sliding login panel to disappear from the top of each page. Is there any way I can do this simply?
Well here is how I’d do it. Upon login, set a session variable, and on each page, see if that variable is NOT set, than echo out the slider. Simple as that :).
ryan said rightly… you try to starting an session using session_start(); . using this you can check whether the session is created of not if so then we can hide the login slider out of the header.
///// check the session using user level will be a smart or a better idea…
You wouldn’t have it show on the page by default. You would do the if statement to see if the variable isn’t set. IF IT’S NOT SET, then echo it on the page
do you have any field like level to measure the user level whether he is a admin or user like that…???
or can you give me the field you have in users table…???
may be it will help me to explain you on how to hide the login panel… its very simple my friend… respond quickly so that you `ll get some quick response…