Jump to content

Benny on the Loose

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Benny on the Loose's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I'm hoping someone can help me with this! I'm using Dreamweaver MX to do all of this. I want to e-mail form information to different e-mail addresses. The form contains: Name: e-mail: Enquiry: County: - This is the drop down menu. Depending which county they select, it will e-mail the form the relevant person in that county. For example, I've got the 'County' List set as: Item Label                    Value Berkshire                      "bcc:dave@davesplumbers.com, bcc:adam@adamsplumbers.com, bcc:records@records.com" Hampshire                    "bcc:pete@petesplumbers.com, bcc:me@me.com" London                          "alan@alansplumbers.com" My form processor script looks like this (it's not my own - I wouldn't have had a clue where to start!): <?php   if ($_SERVER['REQUEST_METHOD']=="POST"){       if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 ||         !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']))         die("Bad referer");       $msg="Values submitted by the user:\n";       foreach($_POST as $key => $val){         if (is_array($val)){             $msg.="Item: $key\n";             foreach($val as $v){               $v = stripslashes($v);               $msg.="  $v\n";             }         } else {             $val = stripslashes($val);             $msg.="$key: $val\n";         }       }       $recipient="email@address.com";       $subject="Enquiry";       error_reporting(0);       if (mail($recipient, $subject, $msg)){         echo nl2br($input);       } else         echo "An error occurred and the message could not be sent.";   } else       echo "Bad request method"; ?> .......................... I want the processor to take the 'value' from the 'county' field & place this in the $recipient='field'. I've tried a few different things but I can't get it to work. To complicate it, I don't actually want the 'value' (i.e the e-mail addresses) to appear in the form data that is sent out. This is because I want to keep the users e-mail addresses confidential. If anyone can help, I shall be eternally grateful!
  2. I'm hoping someone can help me with this! I'm using Dreamweaver MX to do all of this. I want to e-mail form information to different e-mail addresses. The form contains: Name: e-mail: Enquiry: County: - This is the drop down menu. Depending which county they select, it will e-mail the form the relevant person in that county. For example, I've got the 'County' List set as: Item Label                    Value Berkshire                      "bcc:dave@davesplumbers.com, bcc:adam@adamsplumbers.com, bcc:records@records.com" Hampshire                    "bcc:pete@petesplumbers.com, bcc:me@me.com" London                          "alan@alansplumbers.com" My form processor script looks like this (it's not my own - I wouldn't have had a clue where to start!): <?php   if ($_SERVER['REQUEST_METHOD']=="POST"){       if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST'])>7 ||         !strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']))         die("Bad referer");       $msg="Values submitted by the user:\n";       foreach($_POST as $key => $val){         if (is_array($val)){             $msg.="Item: $key\n";             foreach($val as $v){               $v = stripslashes($v);               $msg.="  $v\n";             }         } else {             $val = stripslashes($val);             $msg.="$key: $val\n";         }       }       $recipient="email@address.com";       $subject="Enquiry";       error_reporting(0);       if (mail($recipient, $subject, $msg)){         echo nl2br($input);       } else         echo "An error occurred and the message could not be sent.";   } else       echo "Bad request method"; ?> .......................... I want the processor to take the 'value' from the 'county' field & place this in the $recipient='field'. I've tried a few different things but I can't get it to work. To complicate it, I don't actually want the 'value' (i.e the e-mail addresses) to appear in the form data that is sent out. This is because I want to keep the users e-mail addresses confidential. If anyone can help, I shall be eternally grateful!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.