CODE
<?php
$input = $_POST['input']; # The variable for the user's input
$new = md5($input); # The new string that is the user's input after being hashed
#Be sure that you change the md5.php in this variable
#to the filename of this file
$form = "<center><form action='md5.php' method='POST'>
<label>Input </label><input type='text' name='input' /><br /><br />
<input type='submit' value='Hash it!' /></form></center><!--GreyFox MD5-->";
if($input ==""){ // If the input it blank, it just displays the empty form
echo $form;
}
else { # If an input has been supplied, it displays the hash and the form
echo "
<center>
$new<br /><br />
$form</center>";
}
?>
$input = $_POST['input']; # The variable for the user's input
$new = md5($input); # The new string that is the user's input after being hashed
#Be sure that you change the md5.php in this variable
#to the filename of this file
$form = "<center><form action='md5.php' method='POST'>
<label>Input </label><input type='text' name='input' /><br /><br />
<input type='submit' value='Hash it!' /></form></center><!--GreyFox MD5-->";
if($input ==""){ // If the input it blank, it just displays the empty form
echo $form;
}
else { # If an input has been supplied, it displays the hash and the form
echo "
<center>
$new<br /><br />
$form</center>";
}
?>
Well, all this does is it takes the user's input, calculates the MD5 hash of the input, and displays it to the user.
discuss this topic to forum
