first timer, im trying to make this code switch from login to logout when someone log onto the websitethis is how it is set up
<?phpif(isset($_SESSION['uid'])){?> <a href="logout.php">Log Out</a> <?php}else{?> <a href="login.php">Log In</a> <?php}?>
i have at the very top session_start(); inside of an opening and closing php tags then the html texts, and inside of a table thats where i have the above code so when i log in it redirect me to the index page and then it changes to logout, but it doesnt it keeps login not what i want to happen does anyone see anything wrong here?