0
I have this code to print the data on the page coming 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 already tested the query and it’s fine. It also returns the session variable $id_login
. But the page goes blank and I can’t see what the mistake is.
Thank you.
Put this at the top of the page,
ini_set('display_errors', true); error_reporting(E_ALL);
blank page is already a mistake.– rray
Without any
echo
,print
,var_dump
orprintf
the page will go blank even– Leonardo