/    Sign up×
Community /Pin to ProfileBookmark

Help with Email

I have a form with multiple checkboxes on it. Each check box has multiple emails. What i want to do is if they check the checkboxs then it needs to send out a email to the selected persons. Below is what is in the database.
ID,S,E
1,a,[email protected]
2,a,[email protected]
3,a,[email protected]
4,b,[email protected]
5,b,[email protected]

So if they select a then it will send one email to all that is a If they select a,b then it will send 2 emails one for a and one for b
Here is the code for the checkboxs

[code=php]<form id=”form1″ name=”form1″ method=”get” action=”SendBWMEmail.php”>
<table border = “1” cellpadding = “5”>
<tr>
<?php
while ($row = mysql_fetch_row($getSwitch))
{
if (($cats / 15) == 1)
{
echo “<td align = ‘center’>$row[0]:<input type=’checkbox’ name=Switch value=$row[0] /> <br /></td></tr><tr>”;
$cats = 1;
}
else
{
echo “<td align = ‘center’>$row[0]:<input type=’checkbox’ name=Switch value=$row[0] /> <br /><br /></td>”;
$cats++;
}
}
?>
</tr></table>

[/code]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @rwtrwt2003 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...