PDA

View Full Version : php and vB cookie question


Pulsorock
04-05-2003, 08:43 PM
Hi!
I'm developing a page outside vB that I want to display if the user is logged in or not. If he is logged in, display a log out link, and if he is not, display a logging form (username and password fields). I thinks I can do this reading the cookie that vB uses to see if it has a userid on it, but I don't know how to do this. Any idea would be great.

Thanks

Pulsorock
04-06-2003, 01:47 PM
Ok, let me see if asking the question a little more specific.
I need to check vB cookie to see if it has a user logged in. For example, for doing this
Lets say $user_logged returns a true or false if the user cookie has an userid logged.
<?
if ($user_logged == true) {
echo "User logged";
}else{
echo "Not logged";
}
?>

Thanks