Welcome to WebmasterWorld Guest from 54.205.65.73

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

trying to send multiple emails

help with php code to multiple emails

     
4:35 pm on Jan 29, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 9, 2006
posts: 177
votes: 0


Hello all,

On the previous form I am pulling the vendor id. But then I need to get the emails from the db with the vendor id. However, I need to be able to send to all people who were previously selected.

Can you help in updating the code?

Thanks,
Matt

I hope this is enough snippet



$go_up=0;
$inputs="";
while($go_up<$num){
$go_up++;
$check_field_name="check".$go_up;
if(isset($_POST[$check_field_name])){
$value=$_POST[$check_field_name];

//display names:
$ex=explode("_toexplode_",$value);
$businessname=$ex[0];
$names.='<br>* '.$businessname;
$inputs.='<input type=hidden name='."$check_field_name".' value="'."$value".'" >';
}}

$go_up=0;
while($go_up<$num){
$go_up++;
$check_field_name="check".$go_up;
if(isset($_POST[$check_field_name])){
$value=$_POST[$check_field_name];
$value=explode("_toexplode_",$value);
$id=$value[1];

//read the email from db based on vendor id:
$sqlemail="SELECT * FROM sample WHERE dbid='$id' ";
$resultemail = @mysql_query( $sqlemail, $connection );
$rowemail = mysql_fetch_array($resultemail);
$businessemail= $rowemail['Username'];

$businessname=$value[0];
$to = $businessemail;
12:51 am on Jan 30, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 9, 2006
posts: 177
votes: 0


sorry, figured it out...forgot to reconnect to the db after each one
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members