PHP Login & Logout process

Hello, I am referring to the article: PHP Client Registration, Login, Logout and Easy Access Control
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_2391-PHP-login-logout-and-easy-access-control.html

I have created login and register page. Now, once user is logged in, user should be able to see the logout page. I tried giving logout link on individual pages that are connected with the login process. I think that is wrong way of doing it. Logout should appear automatically on every page once user is logged in. Could you give me some idea of how I can display the logout link automatically after user log's in?
sanjay1911Asked:
Who is Participating?
 
Ray PaseurConnect With a Mentor Commented:
Maybe something like this...
if ($uid = access_control(TRUE))
{
    echo "<a href=\"logout.php\">LOGOUT $uid</a>";
}

Open in new window

0
 
sanjay1911Author Commented:
Thanks! Ray
0
 
Ray PaseurCommented:
Glad to help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.