I have the following data
admlogin: admin1 admsenha: admin
admlogin: admin2 admsenha: admin
admlogin: admin3 admsenha: admin
<form action="#" method="post" id="frm_login_p" name="frm_login_p">
<input class="form-control" type="text" name="p_login" placeholder="Login, CNPJ ou Telefones" id="p_login">
<input class="form-control" type="password" name="p_senha" required="" placeholder="Senha" maxlength="255" minlength="2" id="p_senha">
</form>
<?php
$atividade='1';
$login=$_POST['p_login'];
$senha=$_POST['p_senha'];
$sql="SELECT id,nome,cnpj FROM tbl_postos WHERE cnpj='".$login."' AND admsenha='".$senha."' AND ativo='".$atividade."' OR telefone='".$login."' AND admsenha='".$senha."' AND ativo='".$atividade."' OR whatsapp='".$login."' AND admsenha='".$senha."' AND ativo='".$atividade."' OR email='".$email."' AND admsenha='".$senha."' AND ativo='".$atividade."' OR admlogin='".$login."' AND admsenha='".$senha."' AND ativo='".$atividade."'";
if ($result = @mysqli_query($CnHUP,$sql)){
while($row = @mysqli_fetch_array($result)) {
$ident=$row['id'];
$cnpj=$row['cnpj'];
$nome=$row['nome'];
echo "Identificador: $ident CNPJ: $cnpj Nome: $nome";
}}
?>
At least in theory, only admin / admin should be displayed in the table;
the problem is that when finding a lower value ...
for example: adm or admi or admin ... it keeps selecting and displaying information. how to select just the exact value? admin1 or admin2 or admin3