TeleQom.org/php/contact.php

17 lines
781 B
PHP
Raw Normal View History

2023-03-15 19:53:04 +00:00
<?php
$lang_folder = $_GET['contact-language']=="en"?"/pages/en/":"/pages/fr/";
if(!filter_var($_GET['contact-email'], FILTER_VALIDATE_EMAIL) || strlen($_GET['contact-message'])==0 || strlen($_GET['contact-name'])==0 || $_GET['contact-email-2'] != ""){
header("Location: ".$lang_folder."err/contact.html");
die();
}
$receiver_email = "info@teleqom.org";
$message = "Contact: ".$_GET['contact-name']."\nEmail: ".$_GET['contact-email']."\nMessage:\n".$_GET['contact-message'];
$headers = 'From: '.$receiver_email . "\r\n" .
'Reply-To: '.$_GET['contact-email'] . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($receiver_email,"Contact TeleQom.org",$message,$headers);
header("Location: ".$lang_folder."confirmation.html");
?>