2
In my mysqli it was easy
$_SESSION['userphoto'] = $row['userphoto'];
How to make it work on PDO ?
Connectionlogin.php
session_start();
$stmt->bindParam(':email', $_POST['email']);
$stmt->bindParam(':senha', md5($_POST['senha']));
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
if($row > 0){
$_SESSION['email'] = $_POST['email'];
$_SESSION['userphoto'] = $row['userphoto'];
//$_SESSION funcionava certo no MYSQLI
I think you’re confused buddy :)
– Guilherme Nascimento
You overbought $Row and lost the information you were interested in
– bfavaretto
I’ve already removed this variable
– Kevin mtk
As you expect only one row of database tries to overwrite
fetchAll
by justfetch
.– Skywalker
exactly what @rray replied
– Skywalker
I’ll try this tomorrow
– Kevin mtk
Note: For those who were surprised by my first comment, it actually refers to the first version of the question http://answall.com/revisions/58469/1 :) Good evening
– Guilherme Nascimento