I receive this warning that does not allow me to continue:
Warning: session_start (): Can not start session when headers already sent in C: \ xampp \ htdocs \ bancoinfocial \ index.php on line 45
Notice: Undefined variable: _SESSION in C: \ xampp \ htdocs \ bancoinfocial \ principal.php on line 3
And this is my code:
index.php
<div id="principal" hidden>
<?php
session_start();
require_once("principal.php");
?>
</div>
principal.php
<div>
<?php
echo $_SESSION['fullname'];
?>
</div>
That is, I invoke principal.php from index.php where you can not log in by headers already sent even though it is the first instruction that I execute in each invocation of the session_start()
method.