i am using a script at front end, if a user logs in, it should render username in place of login button else it should remain the same. but my script is not not working....
<?php
if(!isset($_SESSION['txt_username']) || !isset($_SESSION['txt_pwd'])){
echo "<a href='login.php'>Log in</a>";
header("Location:login.php");
else {echo $_SESSION['txt_username']}
}
?>