artweb99
10 Jun 2011, 12:38 PM
Hi guys,
I'm having a little problem I need help with. I created a form in HTML and I did the PHP code for the submission button. My question is, how can I make the message be sent to 2 different emails instead of one only.
Here is my PHP code:
<?php
/*subject and email varibales*/
$emailsubject = 'via Bo-sacs website';
$webmaster = 'artweb99@gmail.com';
/*gathering data variables*/
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$commentField = $_POST['comment'];
$body = <<<EOD
<br><hr><br>
Name : $name <br>
Email : $email <br>
Comment : $comment<br>
EOD;
$headers = "From: $email\r\n";
$headers = "Content-type: text/html\r\n";
$success = mail($webmaster,$emailsubject,$body,$headers);
/*Results randered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>merci</title>
</head>
<body>
<p>Votre message a été envoyer, nous vous répondrons dans les plus bref délais
</p>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you
I'm having a little problem I need help with. I created a form in HTML and I did the PHP code for the submission button. My question is, how can I make the message be sent to 2 different emails instead of one only.
Here is my PHP code:
<?php
/*subject and email varibales*/
$emailsubject = 'via Bo-sacs website';
$webmaster = 'artweb99@gmail.com';
/*gathering data variables*/
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$commentField = $_POST['comment'];
$body = <<<EOD
<br><hr><br>
Name : $name <br>
Email : $email <br>
Comment : $comment<br>
EOD;
$headers = "From: $email\r\n";
$headers = "Content-type: text/html\r\n";
$success = mail($webmaster,$emailsubject,$body,$headers);
/*Results randered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>merci</title>
</head>
<body>
<p>Votre message a été envoyer, nous vous répondrons dans les plus bref délais
</p>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you