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,
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

ereg_replace issue
hi there people

i have this code happening with regards to my wamp server. is this something

How to form a xml form table with a single sql statement..?
Hi everyone,
I don't know if this is going to be a duplicate thread but i couldn't

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

compile php5 with DOM
Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

Remote Database Access
Hey guys!!

OK, i'm used to only working with databases from the CPANEL, accessing phpMyAdmin

Help with Hyperlink
Hi,

What I am trying to do may be simple, I just can't get it to work. Ok...

I am usin

Best way to check for end of a record and send it back to the first record
I'm hoping someone can help me out and explain the best way to accomplish this.

What I'm doin

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

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