Skip to content

Instantly share code, notes, and snippets.

@ewized
Created September 23, 2014 04:58
Show Gist options
  • Save ewized/e3361bb47b4867a4befa to your computer and use it in GitHub Desktop.
Save ewized/e3361bb47b4867a4befa to your computer and use it in GitHub Desktop.
Simple md5 encrypt.
<?php
$data = $_POST["data"];
$is_data = isset($data);
?>
<form method="post">
<label> Key
<?php if ($is_data): ?>
<input name="data" type="text" value="<?= md5($data) ?>" size="30" />
<?php else: ?>
<input name="data" type="password" size="30" />
<?php endif ?>
</label>
<input type="submit" value="Encrypt" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment