This commit is contained in:
dsyoon
2025-12-27 13:09:05 +09:00
commit f99bb2ba6b
133 changed files with 20073 additions and 0 deletions

21
php/newsletter.php Normal file
View File

@@ -0,0 +1,21 @@
<?php
if($_POST){
$fileName = 'newsletter.txt'; //set 777 permision for this file.
$error = false;
$email = $_POST['email'];
if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))
$error = true;
//If all ok, save emali adress in file
if($error == false){
$file = fopen($fileName, a);
fwrite($file, "$email,");
fclose($file);
echo 'OK';
}
}