File "contact-form-handler.php"
Full Path: /home/u165092617/domains/tadzz.com/public_html/forms/contact-form-handler.php
File size: 1.13 KB
MIME-type: text/x-php
Charset: utf-8
<?php session_start();
include("../config/config.php");
$alertType='1';// ADMIN=1 USER =0
$username = secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'name']);
$message = secureSuperGlobalPOST($_REQUEST[SESS_MASTER.'message']);
$to = "mukesh.gehlot019@gmail.com"; // this is your Email address
$from = $_POST[SESS_MASTER.'email']; // this is the sender's Email address
$subject = "Enquiry";
$subject2 = "Copy of your form submission";
$message = $username . " wrote the following:" . "\n\n" . $message;
$message2 = "Here is a copy of your message " . $username . "\n\n" . $message;
$headers = "From:" . $from;
$headers2 = "From:" . $to;
$retval= mail($to,$subject,$message,$headers);
$retval_u= mail($from,$subject2,$message2,$headers2);
if( $retval == true ) {
echo "Message sent successfully...";
$_SESSION["created"] = '42' ;
echo "<script>window.location='../contact-us';</script>";
}else {
echo "Message could not be sent...";
}
?>