I'm having a problem where sql does not recognize the pussy
<div class="col-md-6 form-left">
<select name="utilizadores" >
<option value="0">Utilziadores ativados</option>
<option value="1">utilizadores arquivados</option>
</select>
<div class="form-inputs name">
<p>Pesquisar por nome</p>
<input type="text" name="pesnomeuser" placeholder="" />
</div>
if(isset($_POST['procura'])){
$procura=$_POST['pesnomeuser'];
$utilizadores=$_POST['utilizadores'];
$sql=sprintf("select * from users where NOMEUSER like '%s' or USER like '%s' and arquivo='%t' order by NOMEUSER asc;","%".$procura."%","%".$procura."%",$utilizadores);
$a=mysqli_query($ligacao,$sql);
?>
<table>
<tr>
<th>Nome</th>
<th>Nome de utilizador</th>
</tr>
<?php while ($reg_sql=mysqli_fetch_array($a)){ ?>
<tr>
<td><?php echo $reg_sql['NOMEUSER']; ?></td>
<td><?php echo $reg_sql['USER']; ?></td>
<td>
<input type="hidden" name="id" value="<?php echo $id; ?>">
<a href="utilizadores.php?edit=<?php echo $reg_sql['ID_USER']; ?>" class="edit_btn" >Editar</a>
</td>
<td>
<input type="hidden" name="id" value="<?php echo $id; ?>">
<a href="utilizadores.php?eliminar=<?php echo $reg_sql['ID_USER']; ?>" class="edit_btn" >Eliminar</a>
</td>
</tr>
<?php }
?>
</table>
<?php
}