0

Hi,

I have login logout problem.when i LOGED IN i want my login button change it logout.But its not beahave like this.here is my code please see and help with neccessary steps:

<?php 
        if(isset($_SESSION['user_active_status'])=='1')
        {
            ?>
<div class="user_purpose">
                <ul>
                <a href="index.php?page_select=page_logout124" style=" font-family: calibri; color: white;"><li class="user_log">Logout</li></a>      // page_select : page_logout124 //
                </ul>
                </div>
                <?php
                }else{ ?>
                         <div id="user_purpose">
                <ul>
                <!-- <li class="us_log"><a href="./index.php?page_select=page_reg124">Register</a></li>-->
                    <a href="./index.php?page_select=page_login125" style=" font-family: calibri; color: white;"><li class="user_log">Login</li></a>    // page_select : page_login125 //
                </ul>
            </div>
                 <?php   }  ?>

OR if you have any good refference please you do i will accept.
Thanks

Edited by rjony321: spelling mistake

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Squidge
0

Where is your Login/Logout button?

Assign your button a name (ie/ button_1), then use your existing IF statement.

if(isset($_SESSION[user_active_statue] == 1))
{
    $button_1 = "Logout";
}
else {
    $button_1 = "Login In";
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.