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

Help: problem with Headers to download PDF file
Hi,

I'm trying to implement a script where when a user clicks a link he gets a PDF file to op

Effort Estimation Template for Steady State Support
Hi Everyone,

Is there any SAP provided template/format for system change and enhancements

IIS on 2003 anon access disabled issue
I have an IIS server that belongs to a domain, and anonymous access is turned off for all my sites.

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

Storing Values taken from a DB...
Using this code it will generate a short list from my database

<?php
mysql_connect

RFQ Configuration - can you make PLANT field an optional field in ME42
Is there a way to make the plant field on an RFQ optional in change mode (ME42)?

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

Strange HTML Tag?
I recently noticed some odd HTML appear in some of the websites I host. Not all of them are run on a

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

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