Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("/home/www/PasswordHash.php"); <-- tutaj rozne kombinacje, bez () nie wywala errorow :D
- $user = $_POST['user'];
- $pass = $_POST['pass'];
- $db = new PDO( 'mysql:host=localhost;dbname=xxxx', xxxxx, xxxx);
- $sql = "SELECT * FROM wp_users WHERE user_login=:user";
- $query = $db->prepare( $sql );
- $query->execute( array( ':user'=>$user ) );
- $results = $query->fetchAll( PDO::FETCH_ASSOC );
- foreach( $results as $row )
- {
- $stored_hash = $row[ 'user_pass' ];
- //$hash_obj = new PasswordHash(8, false);
- //$password = HashPassword($pass); <--- te 3 zakomentowane linie każda z nich jak odkomentuje wywala błąd
- //$check = CheckPassword($password, $stored_hash); error 500.... a potrzebuje je, funkcje te sa w PasswordHash.php
- if(check) nie wiem jak to "naprawić"
- {
- echo("tak");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement