inital commit

This commit is contained in:
2026-05-17 18:29:30 -05:00
parent b827236fe2
commit 7c1e18bd59
4683 changed files with 159402 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
<?php
function parseInput($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['email'])) {
$to_email = 'noreply@createwebsites.pl';
$user_email = parseInput($_POST['email']);
$subject = "a user is asking for a newsletter";
$body = "<p>a user (<a href=\"mailto:$user_email\">$user_email</a>) is asking for a newsletter</p>";
$header.= "MIME-Version: 1.0\r\n";
$header.= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$header.= "X-Priority: 1\r\n";
if ( mail($to_email, $subject, $body, $header)) {
echo("success");
} else {
echo("fail");
}
} else {
echo ("email cannot be empty");
}
?>