Search Help Board

PHP Articles
PHP Help
Bulletin Board

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

C# Help

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");


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");


Thank you so much.

?Re: Desperate
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]";
????case "AK":
??????$mailto="[email protected]";

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:
Email replies to this thread, to the address above.

Provided By