title: wordpress Hash method + login with wordpress database
body: <p>I use some external php I wrote and I want it to be used by <code>wp_users</code>. </p>
  
  <p>So, I check user and password - if it matches I <code>echo</code> 'logged in'.</p>
  
  <p>In Wordpress documentation it says the Wordpress hash method is MD5! </p>
  
  <p>But when I md5 this (<code>123321</code>), I get this:</p>
  
  <pre><code>c8837b23ff8aaa8a2dde915473ce0991
  </code></pre>
  
  <p>But the password in my database is saved like this : </p>
  
  <pre><code>$P$BKaMz3dTLI9GIspy4Qmk2jPPQ4zv9f1
  </code></pre>
  
  <p>Is there any way to get a hash method in an external php to check if the user is logged in or not? 
  This is my code:</p>
  
  <pre><code>$userName = isset($_POST["name"]) ? $_POST["name"] : null;
  $userPass = isset($_POST["pass"]) ? $_POST["pass"] : null;
  $userPass = md5($userPass);
  if ($userName &amp;&amp; $userPass ){
      //print_r('SELECT * FROM wp_users WHERE user_login = "'.$userName.'"');
      $sql = "SELECT * FROM wp_users WHERE user_login = '$userName' limit 1";
      $result = $con-&gt;query($sql);
      if (!$result) {
          die('Invalid query: ' . mysql_error());
      }
      if ($result-&gt;num_rows &gt; 0) {
        $row = $result-&gt;fetch_assoc();
  
        // CHECK PASS
       if($row['password'] == $userPass){
           echo "yeah you logged in";
       }
  
      }
  }
  </code></pre>