I have the following HTML code. I have 2 php files: login.php and logout.php. When any user first comes to my page, I would like him to see the login link. After clicking lo
I am assuming you are using a session to check whether user logged in or not. If not, create a session variable and set once logged in. Clear the session variable on log out. So you can check
if(isset($_SESSION['logged_in'])){
//your logout link
}else{
//your login link
}