Skip to content

Instantly share code, notes, and snippets.

@hansent
Created November 10, 2014 18:18
Show Gist options
  • Save hansent/77da8af91687f6b9dbe2 to your computer and use it in GitHub Desktop.
Save hansent/77da8af91687f6b9dbe2 to your computer and use it in GitHub Desktop.
<!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