Created
November 10, 2014 18:18
-
-
Save hansent/77da8af91687f6b9dbe2 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Thank You</title> | |
</head> | |
<body> | |
<h1>Thank you!</h1> | |
<? | |
$email = $_GET['email'] . "\n"; | |
file_put_contents('./emails.txt', $email, FILE_APPEND); | |
$emails_text = file_get_contents('./emails.txt'); | |
$email_list = explode("\n", $emails_text); | |
echo "<ul>"; | |
foreach ($email_list as $e_mail) { | |
echo "<li>$e_mail</li>"; | |
} | |
for($i=0; $i< count($email_list); $i++) { | |
$e_mail = $email_list[$i]; | |
echo "<li>$e_mail</li>"; | |
} | |
echo "</ul>" | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment