Jump to content

Help with send me copy of form


coopera

Recommended Posts

Hi I am trying to create a form that has a check box for send me a copy, i have created the below it sends the support resquest but does not CC the person requesting the support.

 

php code:

 

$email= valid_email($_POST['email']);

$toEmail = "[email protected]";

$username= $_POST['username'];

$question= $_POST['question'];

$priority= $_POST['priority'];

$headers = 'From: [email protected]' . "\r\n";

$headers .= 'Reply-To:' . $email . "\r\n";

$headers .= 'X-Mailer: PHP/' . phpversion();

// if they want to be CC'd

if(isset($_POST['copyMe']))

{

$headers .= 'Cc:' . $email . "\r\n";

}

$subject = "MIS Support";

$message = "Name: $username[/color]

 

 

<input type="checkbox" name="copyMe" value="checkbox" />

<em>Send a copy to my email</em></label></p>[/font]

 

 

Can someone please help.

 

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/70222-help-with-send-me-copy-of-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.