PHP - using variables across different files

     

PHP noob here. I'm trying to create a login file. Here's my code:


HTML:


    

PHP:


$usernameIn = $_POST['user'];   $passwordIn = $_POST['pass'];
$usernameIn = stripcslashes($usernameIn);   $passwordIn = stripcslashes($passwordIn);   $usernameIn = mysql_real_escape_string($usernameIn);   $passwordIn = mysql_real_escape_string($passwordIn);
$host = 'localhost';   $user = 'root';   $password = '';   $db ='practice';
$connection = mysqli_connect($host$user$password