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:
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():
PHP Code:
$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
Bookmarks