<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>

<body>

<? if(!$_POST['step']){
query();
}else{
echo "<div class=\"results\"><h2>These are the hash values for: " . $string = $_POST['string'] . "</h2>";
?>
<h3>MD5</h3>
<?
echo md5($string);
?>
<p>
<h3>SHA1</h3>
<?
echo sha1($string);
?>
<p>
<h3>SHA1 of an MD5</h3>
<?
echo sha1(md5($string));
?>
<p>
<h3>SHA256</h3>
<?
echo hash('sha256', $string);
echo "</div><p>";
query();
}
//echo phpinfo();
function query(){
?>
<form action="<?=$SERVER['php_self']?>" method="post">
<fieldset><h2>Lets make a hash!</h2>
<p><label for="string">String of text to hash: </label><input name="string" type="text" placeholder="Enter a string"></p>

<button type="submit" name="step" value="1">Next</button>
</fieldset>
</form>
<?

}
?>

<//body>
</html>

 

 

fieldset, div.results{
padding:15px;
background-color:#D5D5FF;
border:thin solid #09F;
width:1000px;
margin: 0 auto;
}
fieldset h2{
position:relative;
margin:10px 0 10px 15px;
}