$user = $_POST['user'];
$user = $_POST['password'];
$password is not properly defined, and you are using it in the if
below
solved PHP Code Notice: Undefined variable: password in C:\xampp\htdocs\myfiles\login.php on line 51 you must enter your password? [closed]