0
Good is the following I have the following code:
<?php
$verifica = mysqli_query("SELECT * from dados WHERE login='$login'");
$array = mysql_fetch_array($verifica);
$array[senha];
?>
Supposedly, I want to get the login data, where login is equal to variable $login, and then display the password of the same, however I appear the following errors:
Warning: mysqli_query() expects at least 2 Parameters, 1 Given in C: Program Files Vertrigoserv www Adm logar.php on line 9
Warning: mysql_fetch_array() expects Parameter 1 to be Resource, null Given in C: Program Files Vertrigoserv www Adm logar.php on line 10
What’s wrong?
Thank you.
Aren’t you forgetting to pass the connection parameter to mysqli? And another, you’re mixing the libraries. If it started with mysqli, it cannot abruptly change to mysql(which is even deprecated).
– user28595
What do you mean pass the? parameter is that I am from the time of mysql_query.
– Gonçalo
See: http://php.net/manual/en/mysqli.query.php
– user28595
I couldn’t understand.
– Gonçalo