Forum Moderators: coopster
On my form that I created that the data is being sent into a database, I also want to create rules to send outgoing email 1 of 5 people depending on something that was entered in the form.
This might be too complex for a newbie like me, if you think it is, just tell me.
But I am hoping for a site or book to get to read up on it and learn how to do it.
Thank you.
then use PHP's mail function.. heres some links.
[uk2.php.net...]
[w3schools.com...]
yes, i have all my php in one thing, that might not be standard practice but i am just testing.
<?php
$Company = $_POST[Company];
$Phone = $_POST[Phone];
$Email = $_POST[Email];
$Subject = "try this";
$To = "marty_gworek@yahoo.com";
$Msg = $Company;
$Sales = "VT Sales";
$Subject1 = "Thank you for your submission";
$Msg1 = "Please do not respond to this email. <br> Your lead has been forwarded to the correct sales person. <br> you should hear something back soon!";
$Msg2 = "Nick";
$Msg3 = "bite";
if ($_Post["Company"]== "bayfront")
{
mail( $To, $Subject, $Msg, "From: $Company <$Email>");
mail( $Email, $Subject1, $Msg1, "From: $Sales");
}
if ($_Post["Company"]== "voicetech")
{
mail( $To, $Subject, $Msg, "From: $Company <$Email>");
mail( $Email, $Subject1, $Msg1, "From: $Sales");
}
# mail( $To, $Subject, $Msg3, "From: $Company <$Email>");
# mail( $Email, $Subject1, $Msg2, "From: $Sales");
$query= "INSERT INTO partner (Company, Phone, Email) VALUES ('$Company', '$Phone', '$Email')";
echo '<p>',$query;
mysql_query($query) or die('<p>problem with query:'. mysql_error());
?>