Jump to content

Help with processor script


bowenmedia

Recommended Posts

Hello, below is the simple form processor I use on for one of my sites. Can someone please show me how I can make this script send the email to multiple contacts? like a CC

 

I appreciate any help with this.

 

<?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="Website Message:\n\n\n";

foreach($_POST as $key => $val){

if (is_array($val)){

$msg.="Item: $key\n\n";

foreach($val as $v){

$v = stripslashes($v);

$msg.=" $v\n\n";

}

} else {

$val = stripslashes($val);

$msg.="$key: $val\n\n";

}

}

$recipient="[email protected]";

$subject="SUBJECT";

error_reporting(0);

if (mail($recipient, $subject, $msg)){

header( "" );

} else

echo "An error occurred and the message could not be sent.";

} else

echo "Bad request method";

?>

Link to comment
https://forums.phpfreaks.com/topic/120303-help-with-processor-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.