Hi all,
Im new to php and Im having trouble creating a login/logout link for my page that displays as: Log Out | My Account.
when a member is signed in,
And: Log In | Sign Up
When no one is signed in.
The code I've been working with so far is:
<?php if(!isset($_SESSION['userid']))
{
echo "<a href='../register.php'>My Account</a>"
echo "<a href='$thisPage?logout=true'>Logout</a>"
}
else
{
echo "<a href='../login.php'>Log In</a>"
echo "<a href='../register.php'>Sign Up</a>"
}
?>
But when I try to view it nothing displays on the page.
I'd love some help with this, thankyou thankyou thankyou!!
Login / Logout php link
Moderator: General Moderators
-
mischievous
- Forum Commoner
- Posts: 71
- Joined: Sun Apr 19, 2009 8:59 pm
Re: Login / Logout php link
just curious where are the ";" to close the lines out?
-
dhenick
- Forum Newbie
- Posts: 19
- Joined: Tue Oct 20, 2009 10:46 am
- Location: Yogyakarta, Indonesia
- Contact:
Re: Login / Logout php link
better than you show error message on your php.ini setting. so browser can show the output of php error message 