Hi all,
Kirupa forums have rescued me in the past many many times, I’m hoping you guys can save me once again!
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! :sen:
[COLOR=Red]<?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
");
mail(‘me@mycompany.com’, ‘Message sent to mycompany’, $emailmessage, “FROM:$email”);
?>
[/COLOR]