Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. <?php
  2. $username="chronic_*******"
  3. $password="*******";
  4. $database="chronic_hashes";
  5. $con = mysql_connect(localhost,$username,$password);
  6. $plain_text = $_POST["plaintext"];
  7. if ($plain_text != '')
  8.     {
  9.     $hash = md5($plain_text);
  10.     echo "Hash:";
  11.     echo $hash;
  12.     mysql_select_db("chronic_hashes",$con);
  13.     if (!mysql_query("SELECT hash FROM md5 WHERE hash = ".$hash))
  14.         {
  15.         mysql_query("INSERT INTO md5 (hash, plaintext) VALUES (".$hash.", ".$plain_text));
  16.         }
  17.     }
  18. else
  19.     {
  20.     echo "Please fill in the text form";
  21.     }  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement