How to get a form variable in HTML?

2

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?

    
asked by anonymous 01.07.2015 / 20:11

1 answer

3

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;

    
01.07.2015 / 20:33