Skip to content

Instantly share code, notes, and snippets.

@janisdonis
Created January 18, 2016 14:10
Show Gist options
  • Save janisdonis/5b62c0a141c76d414f31 to your computer and use it in GitHub Desktop.
Save janisdonis/5b62c0a141c76d414f31 to your computer and use it in GitHub Desktop.
<?php
include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post)
{
$name = stripslashes($_POST['name']);
$email = trim($_POST['email']);
$subject = stripslashes($_POST['subject']).'- no Styleweb.lv';
$destinations = $_POST['destinations'];
$urls = $_POST['urls'];
$dest_info = implode(", ", $destinations);
$urls = implode(", ", $urls );
$url = $_POST['urls'];
print_r ($_POST['urls']);
print_r ($_POST['destinations']);
$message = "Results: " . print_r( $dest_info.'<br/>'.$urls, true ). "\r\n";
$error = '';
if(!$error)
{
$mail = mail(WEBMASTER_EMAIL, $subject, $message,
"From: ".$name." <".$email.">\r\n"
."Reply-To: ".$email."\r\n"
."Message: ".$message."\r\n"
."X-Mailer: PHP/" . phpversion());
if($mail)
{
echo 'OK';
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment