I am very new to php doing this login form. created a file client.txt has a text "client"
after when i run the code i get
"Notice: Undefined index: password in C:\xampp\htdocs\mateen\aPanel\userform.php on line 17" ERROR
I could not able to understand where i am doing wrong.
<?php
    function isPassword($thePassword){
        $fp = fopen('datafile/client.txt', 'r');
        $code = fgets($fp);
        echo $code;
        fclose($fp);
        if(trim($code)==trim($thePassword)){
            return true;
        }else{
            return false;
        }
    }
    if(isPassword($_POST['password'])){
        session_start();
        $_SESSION['SESS_CLIENT'] = 1;   
    }else{
        session_start();
        $_SESSION['SESS_CLIENT'] = 0;   
    }
    //header("location:../index.php");
?>
 
     
     
     
     
    