I have developed a website with a Signup and Login page. I tried to register and then login and I was successful. But there is still one more thing to do, which I can't do. I need help, to disappear the Register and Login button from menu when I login, and a Logout button should appear. When I logout, then the Logout button should disappear and the Register and login button should appear. I haven't tried yet to create the script because I can do it. Please help me how to acquire these requirements? Thanks in advance...
How are you tracking whether or not they logged in? If it's a session or cookie, just do an if statement where the buttons are. Example <?php if (isset($_SESSION['id'])) { //logged in, show logout button echo 'Logout Button HTML'; } else { echo 'Login and Signup Button HTML'; } PHP: