Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 03-30-2011, 08:39 AM Form with 2 emails
Average Talker

Posts: 16
Name: Phill Brown
Trades: 0
So, I have this code :

PHP Code:
<?php
$to 
"xxx@domain.com";
$subject "Message {$_POST['ams']['Destination']} ";
$from $_POST['ams']['Name'];
$valid=1;
$message ='';
foreach (
$_POST['ams'] as $k=>$v){
if (
trim($v)=='')$valid=0;
$k str_replace('_',' ',$k);
$message .="$k : $v<br>";
}
$message .="<hr />IP: {$_SERVER['REMOTE_ADDR']}";
function 
sndmail($from,$to,$subject,$message){
$headers "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From:".$from ."\r\n";
mail($to$subject$message$headers);
}
if (
$valid=='1') {
sndmail($from,$to,$subject,$message);
header'Location: http://www.domain/succes.html' ) ;
}
else 
header'Location: http://www.domain.com/error.html' );
?>
I want when soemone sent an e-mail with this contact form, the e-maill to arrive on xxx@domain.com and on xxx2@domain.com.

Can anyone help me please ?

LE: Solved.

$to = "xxx@domain.com, xxx2@domain.com";
__________________
I have a
Please login or register to view this content. Registration is FREE
and I write about
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
.

Last edited by RedPitbull; 03-30-2011 at 11:30 AM..
RedPitbull is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-30-2011, 02:12 PM Re: Form with 2 emails
Shey's Avatar
Keeper of the herd

Posts: 1,598
Name: Shey
Location: Behind you, laying my ever corrupting hands upon your shoulders. Soon, you shall be an extension of me.
Trades: 0
Yes

$to = "xxx@domain.com, xxx2@domain.com";
__________________
RenditionDigital provides Software Development, Games Development, Digital Publishing, Social Media moderation in all flavors-
Please login or register to view this content. Registration is FREE
. What is software engineering? There is a great group of highly skilled tech people
Please login or register to view this content. Registration is FREE
. |Also visit My Blog
Please login or register to view this content. Registration is FREE
Shey is offline
Reply With Quote
View Public Profile Visit Shey's homepage!
 
Reply     « Reply to Form with 2 emails
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.67751 seconds with 12 queries