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

Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use

System copy error in RUN ABAP REPORT PHASE
Hi,
I am performing system copy on my test server. I have previously taken export of JAVA + A

get font info from a font file
hello,

Does anyone know how to get font info from a font file ... using php of course !
<

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

Display data returned from Ajaxservices!!
I have a question about displaying results using ajax. I have part of the code below.
$.ajax({

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

Data type mismatch
Hi,
I am migrating data from algol to c.I mapped real datatype in algol to double datatype in

Comparing Values
Hi
I'm reading data from a database and this seems to work OK.

Each system has an associat

Stopping page post back
I have few literal contriols in my page and a repeater too. But inspite of using update panel, postb

how to get different value in second view of webdynpro?
hello guys,

In ABAP webdynpro I am trying to create one application having two views.

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