Hi all,
I have asked in several forums but have not yet found anyone who really knows how to do this.
I have a simple contact form on my website, using html form + php to send the info. I would like to make a change to the form, but do not know how to do it. The change is fairly simple, instead of having the form sent automatically to "me@mycompany.com" I would like the user to be able to select via checkboxes whether they send the info to "me@mycompany.com" "you@yourcompany.com" or "us@ourcompany.com" - or if they like... all 3
I have played and played but have got utterly lost, the php script for the contact form is below, I have made no changes and it works fine as it is - but just emails "me@mycompany.com" - could anybody please please please let me know how to make these changes to allow 3 checkboxes to select who you email? I will be so grateful for any help
Thank you!
<?php
$firstname = $POST['firstname'];
$lastname = $POST['lastname'];
$email = $POST['email'];
$message = $POST['message'];
$emailmessage = "Name: {$firstname} {$lastname}, with an email address of: {$email}, has contacted mycompany with the following message: {$message}";
$response = "Dear {$firstname},
Thank you for contacing mycompany, we have received your message and will respond within 24 hours.
Sincerely,
The Team";
mail($email, 'Your message to Mycompany',$response, "FROM:noreply@mycompany.com\r\n");
mail('me@mycompany.com', 'Message sent to mycompany', $emailmessage, "FROM:$email");
?>