I am trying to hide a button if it enters a profile with an id that does not correspond to the login, that is, the user, but it does not work, how can I solve it?
<?php
if(isset($_GET['id']))
{
$id = mysqli_real_escape_string($conexion, $_GET['id']);
$infouser = mysqli_query($conexion, "SELECT * FROM users WHERE id = $id");
$use = mysqli_fetch_array($infouser);
}
?>
<?php
if($_SESSION['id'] = $id)
{
?>
<button class="ml-4" id="edit" data-toggle="modal" data target="#exampleModalCenter">Editar perfil</button>
<?php
}
?>