...

View Full Version : Hiding an area if session exists



tyanque
12-27-2007, 12:28 AM
Hey,

How do you hide an area of a page if a session exists? e.g. on home page if the user is logged in the login box does not show.

Thanks :)

Inigoesdr
12-27-2007, 12:33 AM
if(empty($_SESSION['logged_in']))
{
// login box
}
// else
Change logged_in to your session variable you want to compare. You could also use session_is_registered() (http://php.net/session_is_registered), but that won't check the value, just see if the variable has been set.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum