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 = "xxxx@xxxx.com.au"; $username= $_POST['username']; $question= $_POST['question']; $priority= $_POST['priority']; $headers = 'From: enquiries@xxxx.com.au' . "\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. Quote 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); } Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.