Error in "=" in mysqli_query [closed]

1

I have a problem with mysqli_query and I can not find the error. I have already tried to make some changes that I saw on the internet and it did not work. I also tried to change the line that has a file problem, but the error persisted. The error message is:

  

[Thu Aug 17 11: 57: 43.192874 2017] [: error] [pid 2716] [client :: 1: 39160] PHP Parse error: syntax error, unexpected '=' in / var / www / html / valida_login .php on line 7, referer: link

And the line quoted is:

result = mysqli_query("SELECT * FROM usuario WHERE login = '$usuario' AND senha = '$senha';");
    
asked by anonymous 17.08.2017 / 17:03

1 answer

4

As resolved by @rray in comments , is syntax error.

% is missing from the assignment (so PHP knows that it is a variable):

$result = mysqli_query("SELECT ...
^
    
17.08.2017 / 17:17