How to set each check box item go to different email address

the mail() function

Moderators: macek, egami, gesf

Post Reply
User avatar
jotorres1
New php-forum User
New php-forum User
Posts: 35
Joined: Thu Oct 27, 2011 1:24 pm
Contact:

Re: How to set each check box item go to different email add

Post by jotorres1 » Wed Nov 02, 2011 6:22 am

Your code is too long dude, but from what you are asking for, I think this might help.

Once the user submits:

Code: Select all

<?php
if(isset($_POST['submit']))
{
  $emails = array();
  if(isset($_POST['checkbox_1']))
  {
    array_push($emails, 'email' => 'EMAIL FOR CHECKBOX 1');
  }

// then to send them all just create a loop
foreach($emails as $mail)
{
    mail($mail[''email'], $subject, $message); //etc.
}

}
?>
Now this is just an overview, as I am not quite sure of what you want.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests