coopera Posted September 21, 2007 Share Posted September 21, 2007 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 More sharing options...
ballhogjoni Posted September 22, 2007 Share Posted September 22, 2007 maybe I am blind but i did not see the mail(). Try something like: if(isset($_POST['copyMe'])) { mail($email,$subject,$message,$headers); } Link to comment https://forums.phpfreaks.com/topic/70222-help-with-send-me-copy-of-form/#findComment-352704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.