navbar buttons sorting if user was logged in php

Replace…

<a style="font-family:'Droid-Arabic-Kufi';"  href="login-user.php" class="btn btn-gradient-warning btn-round my-2  my-sm-0 text-white"><i
                        class="fal fa-sign-in-alt ml-2"></i> چونەژورەوە </a>

<a style="font-family:'Droid-Arabic-Kufi';" href="signup-user.php" class="btn btn-info mr-3 my-2 my-sm-0"><i
                        class="fal fa-user-plus ml-2"></i> خۆتۆمارکردن</a>

With…

Assuming that you have set a variable $loggedon to TRUE in the event that the user is already logged on

<?php
if(!$loggedon){
    echo <<<EOT
        <a style="font-family:'Droid-Arabic-Kufi';"  href="login-user.php" class="btn btn-gradient-warning btn-round my-2  my-sm-0 text-white"><i
                    class="fal fa-sign-in-alt ml-2"></i> چونەژورەوە </a>
        <a style="font-family:'Droid-Arabic-Kufi';" href="signup-user.php" class="btn btn-info mr-3 my-2 my-sm-0"><i
                    class="fal fa-user-plus ml-2"></i> خۆتۆمارکردن</a>';
    EOT;
}
?>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top