Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

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

the mail() function

Moderators: macek, egami, gesf

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

Postby suensh » Mon Oct 24, 2011 9:23 pm

Hi there, I am new here and hoping can get some help for my problem.

I have a form with check box, I need to make it once user click "yes" of different centers (the user allow to click on more than one center), then this form will send to different centers individual email address. If the centers have been clicked on, won't get this form.

I don't know how should I set the php code, can anyone helps please?

Here is the setting. Many many many thanks!!!

Cheers
Suensh

html code:

<body>
<form method="post" action="relief_test1.php">
<table width="573" cellpadding="5" cellspacing="0" class="txt">

<tr>
<td width="10" height="25" bgcolor="#cee39e">&nbsp;</td>
<td width="149" height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Your Full Name</span><span class="txtred">*</span></td>
<td width="265" height="25" bgcolor="#cee39e">
<input name="Name" type="text" size="35" maxlength="40" />
</td>
<td width="107" bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Nickname</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Nickname" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Address in WA</span></td>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Street</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Street" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Suburb</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Suburb" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Postcode</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Postcode" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Home Phone</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Phone" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Mobile</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Mobile" type="text" size="35" maxlength="40" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>

<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" valign="middle" bgcolor="#cee39e" class="txt"><span class="txtbold">Email Address</span><span class="txtred">*</span></td>
<td height="25" bgcolor="#cee39e">
<input name="Email" type="text" size="35" maxlength="50" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" colspan="2" bgcolor="#cee39e" class="txtbold">Are you a permanent resident do you hold the necessary Visa enabling you to live and work?
<p>
<label>
<input type="radio" name="Resident" value="Yes" id="Resident_0" />
<span class="txt">Yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></label>

<label>
<input type="radio" name="Resident" value="No" id="Resident_1" />
<span class="txtbold">No</span></label></td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" bgcolor="#cee39e" class="txt"><span class="txtbold">Visa Number </span>(if applicable)</td>
<td height="25" bgcolor="#cee39e">
<input name="Visa" type="text" size="35" maxlength="50" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>

<tr>
<td bgcolor="#cee39e">&nbsp;</td>
<td colspan="2" bgcolor="#cee39e" class="txt">We have 10 Centres throughout the metropolitan area, which centres are you prepared to travel to in order to work?
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>

<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" colspan="2" valign="top" bgcolor="#cee39e" class="txt"><table width="456" cellpadding="10" cellspacing="0">

<tr>
<td width="212" height="20" bgcolor="#e6f7bf"><span class="txtbold">Centre 1</span><span class="txt"></span></td>
<td width="202" height="20" bgcolor="#e6f7bf"><input name="Beckenham" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Beckenhamcar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20"><span class="txtbold">Centre </span>2</td>
<td width="202" height="20"><input name="Beldon" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Beldoncar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20" bgcolor="#e6f7bf"><span class="txtbold">Centre </span>3</td>
<td width="202" height="20" bgcolor="#e6f7bf"><input name="Morley" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Morleycar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20"><span class="txtbold">Centre </span>4</td>
<td width="202" height="20"><input name="Coolbellup" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Coolbellupcar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="19" bgcolor="#e6f7bf"><span class="txtbold">Centre </span>5</td>
<td width="202" height="19" bgcolor="#e6f7bf"><input name="Forrestfield" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Forrestfieldcar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20"><span class="txtbold">Centre </span>6</td>
<td width="202" height="20"><input name="Maddington" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Maddingtoncar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20" bgcolor="#e6f7bf"><span class="txtbold">Centre </span>7</td>
<td width="202" height="20" bgcolor="#e6f7bf"><input name="Mandurah" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Mandurahcar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20"><span class="txtbold">Centre </span>8</td>
<td width="202" height="20"><input name="Riverton" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Rivertoncar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20" bgcolor="#e6f7bf"><span class="txtbold">Centre </span>9</td>
<td width="202" height="20" bgcolor="#e6f7bf"><input name="SouthLake" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="SouthLakecar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
<tr>
<td width="212" height="20"><span class="txtbold">Centre </span>10</td>
<td width="202" height="20"><input name="Spearwood" type="checkbox" value="yes" />
<span class="txt"> Yes</span> &nbsp;&nbsp;&nbsp;&nbsp;
<input name="Spearwoodcar" type="checkbox" value="yes" />
<span class="txt"> Using Own Car&nbsp;</span></td>
</tr>
</table></td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="28" colspan="4" valign="middle" bgcolor="#97C82B" class="formtitle"> &nbsp;&nbsp;&nbsp;Level Qualifications<br /></td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="35" colspan="2" bgcolor="#cee39e" class="txt">What level qualifications have you achieved? Please indicate by using the table below:</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>

<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="25" colspan="2" valign="top" bgcolor="#cee39e" class="txt"><table width="455" cellspacing="0" cellpadding="0">
<tr>
<td width="43" height="20" align="center" class="txtbold">&nbsp;&nbsp;Level</td>
<td width="320" height="20" align="center" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description</td>
<td width="90" height="20" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hold</td>
</tr>
<tr>
<td width="43" height="50" align="center" class="txtbold">&nbsp;A</td>
<td width="320" height="50" class="formtxt">Holder of a degree or </td>
<td width="90" height="50" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelA" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="50" align="center" class="txtbold">&nbsp;&nbsp;A*</td>
<td width="320" height="50" class="formtxt">As category A and includes hands on experience in the care of 0-24 months age group</td>
<td width="90" height="50" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelA+" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="40" align="center" class="txtbold">B</td>
<td width="320" height="40" class="formtxt">Holder of a diploma, associate diploma or certificate </td>
<td width="90" height="40" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelB" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="50" align="center" class="txtbold">&nbsp;&nbsp;B*</td>
<td width="320" height="50" class="formtxt">As category B and includes hand on experience in the care of
0-24 months age group</td>
<td width="90" height="50" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelB+" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="40" align="center" class="txtbold">&nbsp;C</td>
<td width="320" height="40" class="formtxt">Refers to the holder of mothercraft nursing qualifications.</td>
<td width="90" height="40" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelC" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="40" align="center" class="txtbold">&nbsp;D</td>
<td width="320" height="40" class="formtxt">A person with no relevant qualification or experience </td>
<td width="90" height="40" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelD" type="text" id="textfield" size="8" /></td>
</tr>
<tr>
<td width="43" height="70" align="center" class="txtbold">&nbsp;E</td>
<td width="320" height="70" class="formtxt">Holder of Certificate III in Community Services</td>
<td width="90" height="70" class="txtbold">&nbsp;&nbsp;&nbsp;&nbsp;<input name="LevelE" type="text" id="textfield" size="8" /></td>
</tr>

</table></td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="28" colspan="4" valign="middle" bgcolor="#97C82B" class="formtitle"> &nbsp;&nbsp;&nbsp;Availability Time<br /></td>
</tr>
<tr>
<td height="25" bgcolor="#cee39e">&nbsp;</td>
<td height="35" colspan="2" bgcolor="#cee39e" class="txt"><span class="txt">What is your availability? Indicate the days and or times of the week when <br />
you can work.</span></td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#cee39e">&nbsp;</td>
<td colspan="2" valign="top" bgcolor="#cee39e" class="txt"><table width="455" cellspacing="0" cellpadding="0">

<tr>
<td width="116" height="25" align="center" class="txtbold">&nbsp;&nbsp;Monday</td>
<td width="96" height="25" class="formtxt"><input name="MondayMorning" type="checkbox" value="yes" />
Morning</td>
<td width="109" height="25" class="formtxt"><input name="MondayAfternoon" type="checkbox" value="yes" />
Afternoon</td>
<td width="132" height="25" class="formtxt"><input name="MondayBoth" type="checkbox" value="yes" />
<span class="txt">Both</span></td>
</tr>
<tr>
<td width="116" height="25" align="center" bgcolor="#e6f7bf" class="txtbold">&nbsp;&nbsp;Tuesday</td>
<td width="96" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="TuesdayMorning" type="checkbox" value="yes" />
Morning</td>
<td width="109" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="TuesdayAfternoon" type="checkbox" value="yes" />
Afternoon</td>
<td width="132" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="TuesdayBoth" type="checkbox" value="yes" />
<span class="txt">Both</span></td>
</tr>
<tr>
<td width="116" height="25" align="center" class="txtbold">&nbsp;&nbsp;Wednesday</td>
<td width="96" height="25" class="formtxt"><input name="WednesdayMorning" type="checkbox" value="yes" />
Morning</td>
<td width="109" height="25" class="formtxt"><input name="WednesdayAfternoon" type="checkbox" value="yes" />
Afternoon</td>
<td width="132" height="25" class="formtxt"><input name="WednesdayBoth" type="checkbox" value="yes" />
<span class="txt">Both</span></td>
</tr>
<tr>
<td width="116" height="25" align="center" bgcolor="#e6f7bf" class="txtbold">&nbsp;&nbsp;Thursday</td>
<td width="96" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="ThursdayMorning" type="checkbox" value="yes" />
Morning</td>
<td width="109" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="ThursdayAfternoon" type="checkbox" value="yes" />
Afternoon</td>
<td width="132" height="25" bgcolor="#e6f7bf" class="formtxt"><input name="ThursdayBoth" type="checkbox" value="yes" />
<span class="txt">Both</span></td>
</tr>
<tr>
<td width="116" height="35" align="center" class="txtbold">&nbsp;&nbsp;Friday</td>
<td width="96" height="35" class="formtxt"><input name="FridayMorning" type="checkbox" value="yes" />
Morning</td>
<td width="109" height="35" class="formtxt"><input name="FridayAfternoon" type="checkbox" value="yes" />
Afternoon</td>
<td width="132" height="35" class="formtxt"><input name="FridayBoth" type="checkbox" value="yes" />
<span class="txt">Both</span></td>
</tr>

</table></td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td height="35" bgcolor="#cee39e">&nbsp;</td>
<td height="45" colspan="2" bgcolor="#cee39e" class="txtbold">Are you available at short notice; i.e with 1 hours notice by telephone?
<p>
<label>
<input type="radio" name="ShortNotice" value="Yes" id="ShortNotice_0" />
<span class="txt">Yes</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
<label>
<input type="radio" name="ShortNotice" value="No" id="ShortNotice_1" />
<span class="txtbold">No</span></label>
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>




<tr>
<td colspan="4" valign="middle" bgcolor="#cee39e" class="formtitle"> &nbsp;&nbsp;&nbsp;Additional<br /></td>
</tr>

<tr>
<td bgcolor="#cee39e">&nbsp;</td>
<td colspan="2" bgcolor="#cee39e">
<textarea name="Additional" cols="40" rows="4"></textarea>

</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
<tr>
<td bgcolor="#cee39e">&nbsp;</td>
<td height="30" colspan="2" bgcolor="#cee39e">
<input type="submit" name="submit" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</td>
<td bgcolor="#cee39e">&nbsp;</td>
</tr>
</table>
</form>
</body>

PHP code:
<?php
$to = $_REQUEST['email@email.com'] ;
$from = $_REQUEST['Email'] ;
$name = $_REQUEST['Name'] ;
$phone = $_REQUEST['Phone'];
$phone = $_REQUEST['Street'];
$phone = $_REQUEST['Suburb'];
$phone = $_REQUEST['Postcode'];
$phone = $_REQUEST['Mobile'];
$phone = $_REQUEST['Resident'];
$headers = "From: $from";
$subject = "Enquiries";

$fields = array();
$fields{"Name"} = "\nFull Name";
$fields{"Nickname"} = "\nNickname";
$fields{"Street"} = "\nAddress - Street";
$fields{"Suburb"} = "\nAddress - Suburb";
$fields{"Postcode"} = "\nAddress - Postcode";
$fields{"Phone"} = "\nHome Phone";
$fields{"Mobile"} = "\nMobile";
$fields{"Email"} = "\nEmail Address";
$fields{"Resident"} = "\nAre you a permanent resident of Australia / do you hold the necessary Visa enabling you to live and work?";
$fields{"Visa"} = "\nVisa Number (if applicable)";
$fields{"Beckenham"} = "\nEnable to work in Beckenham";$fields{"Beckenhamcar"} = "By driving my own car";
$fields{"Beldon"} = "\nEnable to work in Beldon";$fields{"Beldoncar"} = "By driving my own car";
$fields{"Morley"} = "\nEnable to work in Morley";$fields{"Morleycar"} = "By driving my own car";
$fields{"Coolbellup"} = "\nEnable to work in Coolbellup";$fields{"Coolbellupcar"} = "By driving my own car";
$fields{"Forrestfield"} = "\nEnable to work in Forrestfield";$fields{"Forrestfieldcar"} = "By driving my own car";
$fields{"Maddington"} = "\nEnable to work in Maddington";$fields{"Maddingtoncar"} = "By driving my own car";
$fields{"Mandurah"} = "\nEnable to work in Mandurah";$fields{"Mandurahcar"} = "By driving my own car";
$fields{"Riverton"} = "\nEnable to work in Riverton";$fields{"Rivertoncar"} = "By driving my own car";
$fields{"SouthLake"} = "\nEnable to work in SouthLake";$fields{"SouthLakecar"} = "By driving my own car";
$fields{"Spearwood"} = "\nEnable to work in Spearwood";$fields{"Spearwoodcar"} = "By driving my own car";
$fields{"LevelA"} = "\nQualifications: Level A";
$fields{"LevelA+"} = "\nQualifications: Level A*";
$fields{"LevelB"} = "\nQualifications: Level B";
$fields{"LevelB+"} = "\nQualifications: Level B*";
$fields{"LevelC"} = "\nQualifications: Level C";
$fields{"LevelD"} = "\nQualifications: Level D";
$fields{"LevelE"} = "\nQualifications: Level E";
$fields{"MondayBoth"} = "\nMonday Full Day";
$fields{"MondayMorning"} = "\nMonday Morning";
$fields{"MondayAfternoon"} = "\nMonday Afternoon";
$fields{"TuesdayBoth"} = "\nTuesday Full Day";
$fields{"TuesdayMorning"} = "\nTuesday Morning";
$fields{"TuesdayAfternoon"} = "\nTuesday Afternoon";
$fields{"WednesdayBoth"} = "\nWednesday Full Day";
$fields{"WednesdayMorning"} = "\nWednesday Morning";
$fields{"WednesdayAfternoon"} = "\nWednesday Afternoon";
$fields{"ThursdayBoth"} = "\nThursday Full Day";
$fields{"ThursdayMorning"} = "\nThursday Morning";
$fields{"ThursdayAfternoon"} = "\nThursday Afternoon";
$fields{"FridayBoth"} = "\nFriday Full Day";
$fields{"FridayMorning"} = "\nFriday Morning";
$fields{"FridayAfternoon"} = "\nFriday Afternoon";
$fields{"ShortNotice"} = "\nAvailable at short notice";
$fields{"Additional"} = "\nAdditional";

$body = "Someone has sent the following enquiries:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

$headers2 = "From: email@email.com";
$subject2 = "Thank you for contacting us";
$autoreply = "Thank you, your enquiry has been received.

The team will get back to you asap.";

if($from == '') {header( "Location: failure.html" );}
else {
if($name == '') {header( "Location: failure.html" );}
else {
$send = mail('email@email.com', $subject, $body, $headers);
$send2 = mail($from, $subject2, $autoreply, $headers2);
if($send)
{header( "Location: thankyou.html" );}
else
{print "We encountered an error sending your mail, please notify email@email.com"; }
}
}
?>
suensh
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Oct 24, 2011 9:13 pm

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

Postby 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.
User avatar
jotorres1
New php-forum User
New php-forum User
 
Posts: 35
Joined: Thu Oct 27, 2011 1:24 pm


Return to PHP coding => Mail

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.