Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- require "connect_db.php";
- $username = addslashes($_POST['username']);
- $password = addslashes($_POST['password']);
- $sql = "SELECT * FROM jos_users WHERE username='$username'";
- $temp = mysql_fetch_array(mysql_query($sql));
- $remote_pass = $temp['password'];
- $parts = explode( ':', $remote_pass );
- if (count($parts) < 2) $converted_pass = md5($password);
- else {
- $salt = $parts[1];
- $converted_pass = md5($password . $salt) . ":" . $salt;
- }
- if ( $converted_pass == $remote_pass )
- {
- echo "JEST!";
- }
- else
- {
- echo "NIJE!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement