<ul class="nav justify-content-end">
<li class="nav-item col-sm-auto ">
<a href="" class="nav-link text-dark"><i class="fa fa-map "></i> Ваш Город:<span
class="font-weight-bold"> </span></a>
</li>
<li class="nav-item col-sm-auto ">
<a class="nav-link mr-5 text-dark waves-effect" href="#!"><i class="fa fa-phone "></i> +7 7252454569</a>
</li>
<li class="nav-item col-sm-auto ">
<a href="../login.php" class="nav-link text-dark"><i class="fa fa-user-circle "></i> Войти</a>
</li>
<li class="nav-item col-sm-auto ">
<a href="../registr.php" class="nav-link text-dark"><i class="fa fa-user-plus "></i> Регистрация</a>
</li>
<li class="nav-item col-sm-auto ">
<a href="/profile.php" class="nav-link text-dark" name=""><i class="fas fa-user-alt"></i> Мои профиль</a>
</li>
<li class="nav-item col-sm-auto ">
<a href="/exit.php" class="nav-link text-dark" name="logout"><i class="fas fa-sign-out-alt"></i>Выйти</a>
</li>
</ul>
<?
if(isset($_POST[name]))
{
include "db.php";
$query = mysqli_query($mysql,"SELECT * FROM `user` where email= '$_POST[email]' and password ='$_POST[password]'");
if(mysqli_num_rows($query))
{
$_SESSION['register'] = $_POST['email'];
$_SESSION['password'] = $_POST['password'];
echo "<script>document.location.href = 'index.php'</script>";
}
else
{
echo "<script>document.location.href = 'registr.php'</script>";
}
}
?>
<?php
echo "<meta http-equiv='refresh' content='0;URL=/?logout'>";
?>
<li class="nav-item col-sm-auto " <?php if(isset($_GET['logout'])) echo "style='display:none'";?>>
<a href="/exit.php" class="nav-link text-dark" name="logout"><i class="fas fa-sign-out-alt"></i>Выйти</a>
</li>
if (isset($_SESSION['loggedin'])) {
// <хтмл код кнопки>
}