R1. email has an address rookie has a value of the word "yes"
R2. email has an address coach is empty
R3. email has an address minor has a value of the word "yes"
OBJECTIVE:
When I submit the form with all three boxes check it should only send an email to rookie and minor because their values are "yes"
PLEASE HELP ME!
I know the code below doesn't work, but it's what I've been staring at with no solutions.
I have the email code working fine. I put an echo down there because if it will echo then I know I can send an email.
THANK YOU!!!!
Expand|Select|Wrap|Line Numbers
- mysql_select_db("lhbrb", $con);
- $names = array($_POST['rookie'],$_POST['minor'],$_POST['coach']);
- $result = mysql_query("SELECT email FROM testemail WHERE $names='yes'");
- while($row = mysql_fetch_array($result))
- {
- echo $row['$names'] . " " . $row['email'];
- echo "<br />";
- }
- mysql_close();
- ?>
- <form action=...php method=post>
- <input type=checkbox name="cb['rookie']"></td>
- <input type=checkbox name="cb['minor']"></td>
- <input type=checkbox name="cb['coach']">
- </form>