noob question

Posted on 16th Feb 2014 by admin

i traying to do a php form with auto replay for both(me and the user who send me a mail),

a using this code

Code: <?php
$contact_name = $_POST['emp'];
$contact_email = $_POST['mail'];
$contact_subject = $_POST['nomw'];
$contact_message = $_POST['tele'];



if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "myemail@myhost.com";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name nEmail: $sender nnSubject: $contact_subject nnMessage: nn$contact_message nnIP: $client_ip nn agradecemos o seu intresse no WMC 2010.nn para concluir o seu registo utilize o link....";

$extra = "From: $senderrn" . "Reply-To: $sender rn" . "X-Mailer: PHP/" . phpversion();




if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>
how i can editt this code to send one copy to me and other to the preson who submited the form??

Other forums