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

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Get dump of MySQL DB from Live Site
I'm after an easy, but secure way of generating and importing a MySQL dump from a remote server.

Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

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

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Rand() help needed
Hi all,

Can someone explain and give me a quick example of how I would go about this?

session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

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