multiple select problem
I need help.
I have this <select multiple="multiple> on my form containing emails fetch form database. I have a problem of getting a workaround on how I can insert the chosen email from that to the $to of mail(). I do know that $to can contain multiple recipients by placing code like this:
Any insights guys?
$to = "firstname.lastname@example.org, email@example.com, firstname.lastname@example.org";
mail($to, $subject, $body, $header);
Assuming you have given the select element an array-style name (e.g.: name="email"), you should then have an array of values that you can implode():
$email = implode(",", $_POST['email']);
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks NogDog, it works like a charm
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)