1
Hello, I don’t know which parameters(I only know one of them) to use in the mysql_fetch_array, please tell me what it is and how to get it.
include "conection.php";
session_start(0);
$db = mysqli_connect("localhost", "root", "");
$login = $_SESSION['login_usuario'];
$sql = mysqli_query($db, "SELECT * FROM usuarios WHERE login = '$login'");
while($linha = mysql_fetch_array($sql, $sql))
{
$nome = $linha['nome'];
$email = $linha['email'];
$idade = $linha['idade'];
$cidade = $linha['cidade'];
}
Grateful from now on.
Have you looked at the documentation?
mysqli_fetch_array
. Avoid using functionsmysql_*
.– stderr
Yes, I’ve read it, but I don’t understand it :c
– Lucas Caresia
What exactly don’t you understand?
– stderr
"The type of array that should be obtained. is a constant and can have the following values: MYSQL_ASSSOC, MYSQL_NUM, and the default value of MYSQL_BOTH." that is
– Lucas Caresia
I just wanted to know what exactly I should put in the second parameter of the mysql_fetch_array.
– Lucas Caresia
I posted an answer, if you have any questions, let me know.
– stderr