?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Desperate
Author:??(---.kc.rr.com)
Date:???01-14-04 06:20

I am VERY new to PHP. I am trying to fix our website so when a customer selects the city they live in that the request goes to the apropriate email address. Right now it goes to one email address so when I edit that and add in \\mail to the code below with the email address I get an error. PLEASE HELP!!!!!!

if ($name == "" | $address1 == "" | $city == "" | $state == "" | $email == ""){$errorcheck = 1;}


if ($errorcheck <> 1){
$text = "A new user wants to join the Pete & Mac's mailing list:\n";
$text .= "\n";
$text .= "Name: $name\n";
$text .= "\n";
$text .= "Address:\n";
$text .= " $address1\n";
$text .= " $address2\n";
$text .= " $city, $state $zip\n";
$text .= " \n";
$text .= "Email: $email\n";
$text .= "\n";
$text .= "\n";
$text .= "Thanks.\n";

//mail("[email protected]", "New mailing list request", "$text","From: $email\r\n");
mail("[email protected]", "New mailing list request", "$text","From: $email\r\n");
}
?>



Welcome!








Join Mailing List


//mail("our email address", "New mailing list request", "$text","From: $email\r\n");
//mail("our email address", "New mailing list request", "$text","From: $email\r\n");
}
?>

>AL
>AK

Thank you so much.

?Re: Desperate
Author:??(66.62.43.---)
Date:???01-14-04 09:24

You would do a switch based on the value of the state select box. Something like.

switch ($state) {
????case "AL":
??????$mailto="[email protected]";
??????break;
????case "AK":
??????$mailto="[email protected]";
??????break;
}

And why do you have the if ($errorcheck==1) block sending mails that doesn't seem to make sense?

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum