Hello,
I am trying to get this form to send a confirmation email to the user saying thank you and some other things but I can not get it to send the email to the user only me. Here is the php code:
PHP Code:
<?php
//print "this is the last record";
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "info@mywebsite.com";
$email_subject = "Registration";
$email_message .= "First Name Entered: ".$_GET["fname"]."\n";
$email_message .= "Last Name Entered: ".$_GET["lname"]."\n";
$email_message .= "Email Entered: ".$_GET["email"]."\n";
$email_message .= "Invitation Code: ".$_GET["email1"]."\n";
$ip=$_SERVER['REMOTE_ADDR'];
$email_message .= "IP ADDRESS: ". $ip."\n";
$ip=$_ENV['REMOTE_ADDR'];
// create email headers
$headers = 'From: '.$_GET["email"]."\r\n".
'Reply-To: '.$_GET["email"]."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
//NEW\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//Create the variables to be used in the mail
$to=$_POST['email'];
$subject="Email Confirmation";
$message="This is a confirmation email";
//Use the mail function to send the confirmation email
mail($to,$subject,$message);
//print $_GET["email"];
//print "it worked";
die();
?>
Thank you
Bookmarks