Login logout link help


Posted on 16th Feb 2014 07:03 pm by admin

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,
Did you know?Explore Trending and Topic pages for more stories like this.
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.
No comments posted yet

Your Answer:

Login to answer
279 Like 15 Dislike
Previous forums Next forums
Other forums

Request for tunning the below query
Hi,

Can any one help me on the below query while improving the performance,

need help to creat database
Hello Team, please guys i am stuck from three days with paypal issue for IPN but no luck yet now i w

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

Retail terminologys not been altered after activing Retail System
Hi, All

After I active Retail System via TCode SWF5, the terms does not been changed, th

Ajax not working on IE 6 for Windows CE
I've created a webpage which uses the classis Ajax in following format:view plaincopy to clipboardpr

Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

CE 7.1 and External GIS integration
Hi All,

We want to develop an application on CE 7.1 which uses GIS features from an exter

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash