• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

PHP Login & Logout process

Hello, I am referring to the article: PHP Client Registration, Login, Logout and Easy Access Control

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?
  • 2
1 Solution
Ray PaseurCommented:
Maybe something like this...
if ($uid = access_control(TRUE))
    echo "<a href=\"logout.php\">LOGOUT $uid</a>";

Open in new window

sanjay1911Author Commented:
Thanks! Ray
Ray PaseurCommented:
Glad to help!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now