mailform without confirmation
Hey all.
I have the following mailform code:
Code:
<?php
if ($_POST["action"] == "send"){
if ($_POST[name] != " your name" and $_POST[name] != "" and $_POST[email] != " your e-mail adress" and $_POST[email] != "" and $_POST[message] != "") {
mail ("info@net.com", "via NET",
"
Name: ".$_POST['name']."
E-mail: ".$_POST['email']."
Message: ".$_POST['message']."
",
"From: ".$_POST['name']." <".$_POST['email'].">");
$subject = "PLANET confirmation";
$msg = "
This is an automatically sent email. Please do not reply.
Dear $_POST[name],
Thanks for your message to NET.
We will get back to you within two working days.
This was your message:
$_POST[message]
";
mail($_POST[email], $subject, $msg);
echo '<br> <br>Thanks ! <br> <br>Your message has been sent,<br> and you will receive a confirmation mail. <br> <br> <br> NET will get back to you within two working days.<br> <br> <br>';
}
else{
echo '<br> <br><font color="#565656;">Your mail has NOT been sent !</font><br> <br>Please fill in all data.<br>Your name, email adress and message are mandatory fields.<br> <br> <br><a href="about.php"><font color="#565656;">[again please]</font></a><br> <br>';
}
}
?>
I would like the same code, but without the confirmation mail sent to the visitor (but with confirmation on the site). Can anyone help me, please ?
In addition I'd need a mandatory select box (drop down) with different emails that are sent too.
F.ex. you can chose between 'webmaster', 'director', 'sales' and then the mails are sent to web@, director@ and sales@