I have an HTML file (html1) to fill user
and pass
, and call a PHP file (php1) to authenticate the values. But I need the user in another PHP file (php2) how do I call the user
value in the php2 file?
I have an HTML file (html1) to fill user
and pass
, and call a PHP file (php1) to authenticate the values. But I need the user in another PHP file (php2) how do I call the user
value in the php2 file?
A simple way to do and create a session and putting user
in it.
example:
session_start(); $_SESSION_['user'] = $user; // no outro arquivo você chama $_SESSION_['user']
another way too and include the second file.
include('caminhodoarquivo.php'); // chame $user;