Created
November 2, 2012 11:41
-
-
Save bbody/4000595 to your computer and use it in GitHub Desktop.
Email Address Munger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Email Address Munger</title> | |
</head> | |
<body> | |
<h3>Put your email in below</h3> | |
<form method='POST'> | |
<input type=text name='email'> | |
<input type=submit> | |
</form> | |
<?PHP | |
$email = $_POST['email']; | |
if (isset($_POST['email'])){ | |
$text = $email; | |
$text = str_replace("@", " [at] ", $text); | |
$text = str_replace(".", " [dot] ", $text); | |
$text = str_replace("_", " [underscore] ", $text); | |
if (strlen($text) > 0){ | |
print ("Your email <b>$email</b> has been | |
turned into <b>$text</b>\n"); | |
} | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment