title: Password does not match after being encrypted using crypt() and password_hash() function
body: <p>I modified my old post. I tried the crypt() function and now trying to work with password_hash() and password_verify() to verify the encrypted password coming from database but on each call, password_hash() function retuns a different encrypted string and  password_verify() cannot match it.</p>
  
  <p>This is how I am doing this.</p>
  
  <pre><code> //please ignore the syntax error if any
  
  $data = '11';
  $dbpass = password_hash($data, PASSWORD_BCRYPT);
  echo $dbpass;  // displays the random strings on each page refresh.
  </code></pre>
  
  <p>Once password is saved into database does not get match during the login process. Below is my actual function.</p>
  
  <pre><code>   private function process_data($password){
      $password = __STR.$password.__STR;
      return  password_hash($password, PASSWORD_BCRYPT);
  
    }
    private function processed($login_password, $dbpassword){
      $login_password = __STR.$login_password.__STR;
      return password_verify($login_password, $dbpassword);
    }
  </code></pre>
  
  <p>On each function call for creating a hashed string for password, the function returns the different string next time. </p>