I have this code to print the data on the page that comes from the database:
<?php
session_start();
include "conection.php";
$id_login = $_SESSION["id_login"];
$stmt =$db->prepare("select login.username, login.nome, login.id_login from login where login.id_login=?");
$stmt->bind_param('i',$id_login);
$stmt->execute();
$stmt->bind_result($username,$nome,$id_login);
$stmt->fetch();
$stmt->close();
?>
I've already tested the query and that's fine. Also returns the session variable $id_login
. But the page goes blank and I do not know what the error is.
Thank you.