Uncaught Error: Call to Undefined Function

Asked

Viewed 533 times

0

I’m having trouble validating Select, would be a login validation and I’m having trouble with Select .

Fatal error: Uncaught Error: Call to undefined function select * from
usuario where email='() in C:\WEB\cadastro\valida.php:4 Stack trace:
#0 {main} thrown in C:\WEB\cadastro\valida.php on line 4

follows below the select:

$sql= mysqli_query ($conexao,"select * from usuario where email='"($_POST['email'])."' and senha='".($_POST['senha_usu'])."' limit 1") or die("Erro");
  • 1

    He’s using myslqli, it won’t change, I think the problem is here, email='"($_POST['email'])." ' , ta concatenated wrong, leaves it like this: email='". $_POST['email']."'

  • You just missed a point

1 answer

5

It is problem in concatenation (missing the point "."):

$sql= mysqli_query ($conexao,"select * from usuario where email='."($_POST['email'])."' and senha='".($_POST['senha_usu'])."' limit 1") or die("Erro");

Browser other questions tagged

You are not signed in. Login or sign up in order to post.