Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username="chronic_*******"
- $password="*******";
- $database="chronic_hashes";
- $con = mysql_connect(localhost,$username,$password);
- $plain_text = $_POST["plaintext"];
- if ($plain_text != '')
- {
- $hash = md5($plain_text);
- echo "Hash:";
- echo $hash;
- mysql_select_db("chronic_hashes",$con);
- if ((mysql_query("SELECT 1 FROM md5 WHERE plaintext = ".$plain_text))==1)
- {
- mysql_query("INSERT INTO md5 (hash, plaintext) VALUES ('".$hash."', '".$plain_text."')");
- }
- }
- else
- {
- echo "Please fill in the text form";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement