Skip to content

Instantly share code, notes, and snippets.

@guilhermevini
Created June 17, 2017 01:46
Show Gist options
  • Save guilhermevini/f19cbf53b646bf555aaa759c5ee40a28 to your computer and use it in GitHub Desktop.
Save guilhermevini/f19cbf53b646bf555aaa759c5ee40a28 to your computer and use it in GitHub Desktop.
incrementa arquivo txt com e-mail vindo de um input
<?php
if(isset($_POST['email'])) {
$myfile = fopen("base.txt", "a") or die("Unable to open file!");
$txt = $_POST['email'] . "\n";
fwrite($myfile, $txt);
fclose($myfile);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment